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

com.pulumi.linode.inputs.FirewallOutboundArgs Maven / Gradle / Ivy

There is a newer version: 4.31.0-alpha.1732773076
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.linode.inputs;

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


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

    public static final FirewallOutboundArgs Empty = new FirewallOutboundArgs();

    /**
     * Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall's inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
     * 
     */
    @Import(name="action", required=true)
    private Output action;

    /**
     * @return Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall's inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
     * 
     */
    public Output action() {
        return this.action;
    }

    /**
     * Used to describe this rule. For display purposes only.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Used to describe this rule. For display purposes only.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * A list of CIDR blocks or 0.0.0.0/0 (to allow all) this rule applies to.
     * 
     */
    @Import(name="ipv4s")
    private @Nullable Output> ipv4s;

    /**
     * @return A list of CIDR blocks or 0.0.0.0/0 (to allow all) this rule applies to.
     * 
     */
    public Optional>> ipv4s() {
        return Optional.ofNullable(this.ipv4s);
    }

    /**
     * A list of IPv6 addresses or networks this rule applies to.
     * 
     */
    @Import(name="ipv6s")
    private @Nullable Output> ipv6s;

    /**
     * @return A list of IPv6 addresses or networks this rule applies to.
     * 
     */
    public Optional>> ipv6s() {
        return Optional.ofNullable(this.ipv6s);
    }

    /**
     * This Firewall's unique label.
     * 
     */
    @Import(name="label", required=true)
    private Output label;

    /**
     * @return This Firewall's unique label.
     * 
     */
    public Output label() {
        return this.label;
    }

    /**
     * A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
     * 
     */
    @Import(name="ports")
    private @Nullable Output ports;

    /**
     * @return A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
     * 
     */
    public Optional> ports() {
        return Optional.ofNullable(this.ports);
    }

    /**
     * The network protocol this rule controls.
     * 
     */
    @Import(name="protocol", required=true)
    private Output protocol;

    /**
     * @return The network protocol this rule controls.
     * 
     */
    public Output protocol() {
        return this.protocol;
    }

    private FirewallOutboundArgs() {}

    private FirewallOutboundArgs(FirewallOutboundArgs $) {
        this.action = $.action;
        this.description = $.description;
        this.ipv4s = $.ipv4s;
        this.ipv6s = $.ipv6s;
        this.label = $.label;
        this.ports = $.ports;
        this.protocol = $.protocol;
    }

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

    public static final class Builder {
        private FirewallOutboundArgs $;

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

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

        /**
         * @param action Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall's inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
         * 
         * @return builder
         * 
         */
        public Builder action(Output action) {
            $.action = action;
            return this;
        }

        /**
         * @param action Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall's inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
         * 
         * @return builder
         * 
         */
        public Builder action(String action) {
            return action(Output.of(action));
        }

        /**
         * @param description Used to describe this rule. For display purposes only.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Used to describe this rule. For display purposes only.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param ipv4s A list of CIDR blocks or 0.0.0.0/0 (to allow all) this rule applies to.
         * 
         * @return builder
         * 
         */
        public Builder ipv4s(@Nullable Output> ipv4s) {
            $.ipv4s = ipv4s;
            return this;
        }

        /**
         * @param ipv4s A list of CIDR blocks or 0.0.0.0/0 (to allow all) this rule applies to.
         * 
         * @return builder
         * 
         */
        public Builder ipv4s(List ipv4s) {
            return ipv4s(Output.of(ipv4s));
        }

        /**
         * @param ipv4s A list of CIDR blocks or 0.0.0.0/0 (to allow all) this rule applies to.
         * 
         * @return builder
         * 
         */
        public Builder ipv4s(String... ipv4s) {
            return ipv4s(List.of(ipv4s));
        }

        /**
         * @param ipv6s A list of IPv6 addresses or networks this rule applies to.
         * 
         * @return builder
         * 
         */
        public Builder ipv6s(@Nullable Output> ipv6s) {
            $.ipv6s = ipv6s;
            return this;
        }

        /**
         * @param ipv6s A list of IPv6 addresses or networks this rule applies to.
         * 
         * @return builder
         * 
         */
        public Builder ipv6s(List ipv6s) {
            return ipv6s(Output.of(ipv6s));
        }

        /**
         * @param ipv6s A list of IPv6 addresses or networks this rule applies to.
         * 
         * @return builder
         * 
         */
        public Builder ipv6s(String... ipv6s) {
            return ipv6s(List.of(ipv6s));
        }

        /**
         * @param label This Firewall's unique label.
         * 
         * @return builder
         * 
         */
        public Builder label(Output label) {
            $.label = label;
            return this;
        }

        /**
         * @param label This Firewall's unique label.
         * 
         * @return builder
         * 
         */
        public Builder label(String label) {
            return label(Output.of(label));
        }

        /**
         * @param ports A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
         * 
         * @return builder
         * 
         */
        public Builder ports(@Nullable Output ports) {
            $.ports = ports;
            return this;
        }

        /**
         * @param ports A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
         * 
         * @return builder
         * 
         */
        public Builder ports(String ports) {
            return ports(Output.of(ports));
        }

        /**
         * @param protocol The network protocol this rule controls.
         * 
         * @return builder
         * 
         */
        public Builder protocol(Output protocol) {
            $.protocol = protocol;
            return this;
        }

        /**
         * @param protocol The network protocol this rule controls.
         * 
         * @return builder
         * 
         */
        public Builder protocol(String protocol) {
            return protocol(Output.of(protocol));
        }

        public FirewallOutboundArgs build() {
            if ($.action == null) {
                throw new MissingRequiredPropertyException("FirewallOutboundArgs", "action");
            }
            if ($.label == null) {
                throw new MissingRequiredPropertyException("FirewallOutboundArgs", "label");
            }
            if ($.protocol == null) {
                throw new MissingRequiredPropertyException("FirewallOutboundArgs", "protocol");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy