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

com.pulumi.digitalocean.inputs.LoadBalancerFirewallArgs Maven / Gradle / Ivy

There is a newer version: 4.35.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.digitalocean.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final LoadBalancerFirewallArgs Empty = new LoadBalancerFirewallArgs();

    /**
     * A list of strings describing allow rules. Must be colon delimited strings of the form `{type}:{source}`
     * * Ex. `deny = ["cidr:1.2.0.0/16", "ip:2.3.4.5"]` or `allow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]`
     * 
     */
    @Import(name="allows")
    private @Nullable Output> allows;

    /**
     * @return A list of strings describing allow rules. Must be colon delimited strings of the form `{type}:{source}`
     * * Ex. `deny = ["cidr:1.2.0.0/16", "ip:2.3.4.5"]` or `allow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]`
     * 
     */
    public Optional>> allows() {
        return Optional.ofNullable(this.allows);
    }

    /**
     * A list of strings describing deny rules. Must be colon delimited strings of the form `{type}:{source}`
     * 
     */
    @Import(name="denies")
    private @Nullable Output> denies;

    /**
     * @return A list of strings describing deny rules. Must be colon delimited strings of the form `{type}:{source}`
     * 
     */
    public Optional>> denies() {
        return Optional.ofNullable(this.denies);
    }

    private LoadBalancerFirewallArgs() {}

    private LoadBalancerFirewallArgs(LoadBalancerFirewallArgs $) {
        this.allows = $.allows;
        this.denies = $.denies;
    }

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

    public static final class Builder {
        private LoadBalancerFirewallArgs $;

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

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

        /**
         * @param allows A list of strings describing allow rules. Must be colon delimited strings of the form `{type}:{source}`
         * * Ex. `deny = ["cidr:1.2.0.0/16", "ip:2.3.4.5"]` or `allow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]`
         * 
         * @return builder
         * 
         */
        public Builder allows(@Nullable Output> allows) {
            $.allows = allows;
            return this;
        }

        /**
         * @param allows A list of strings describing allow rules. Must be colon delimited strings of the form `{type}:{source}`
         * * Ex. `deny = ["cidr:1.2.0.0/16", "ip:2.3.4.5"]` or `allow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]`
         * 
         * @return builder
         * 
         */
        public Builder allows(List allows) {
            return allows(Output.of(allows));
        }

        /**
         * @param allows A list of strings describing allow rules. Must be colon delimited strings of the form `{type}:{source}`
         * * Ex. `deny = ["cidr:1.2.0.0/16", "ip:2.3.4.5"]` or `allow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]`
         * 
         * @return builder
         * 
         */
        public Builder allows(String... allows) {
            return allows(List.of(allows));
        }

        /**
         * @param denies A list of strings describing deny rules. Must be colon delimited strings of the form `{type}:{source}`
         * 
         * @return builder
         * 
         */
        public Builder denies(@Nullable Output> denies) {
            $.denies = denies;
            return this;
        }

        /**
         * @param denies A list of strings describing deny rules. Must be colon delimited strings of the form `{type}:{source}`
         * 
         * @return builder
         * 
         */
        public Builder denies(List denies) {
            return denies(Output.of(denies));
        }

        /**
         * @param denies A list of strings describing deny rules. Must be colon delimited strings of the form `{type}:{source}`
         * 
         * @return builder
         * 
         */
        public Builder denies(String... denies) {
            return denies(List.of(denies));
        }

        public LoadBalancerFirewallArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy