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

com.pulumi.azurenative.servicefabric.inputs.NetworkSecurityRuleArgs Maven / Gradle / Ivy

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

import com.pulumi.azurenative.servicefabric.enums.Access;
import com.pulumi.azurenative.servicefabric.enums.Direction;
import com.pulumi.azurenative.servicefabric.enums.NsgProtocol;
import com.pulumi.core.Either;
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.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Describes a network security rule.
 * 
 */
public final class NetworkSecurityRuleArgs extends com.pulumi.resources.ResourceArgs {

    public static final NetworkSecurityRuleArgs Empty = new NetworkSecurityRuleArgs();

    /**
     * The network traffic is allowed or denied.
     * 
     */
    @Import(name="access", required=true)
    private Output> access;

    /**
     * @return The network traffic is allowed or denied.
     * 
     */
    public Output> access() {
        return this.access;
    }

    /**
     * Network security rule description.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Network security rule description.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
     * 
     */
    @Import(name="destinationAddressPrefix")
    private @Nullable Output destinationAddressPrefix;

    /**
     * @return The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
     * 
     */
    public Optional> destinationAddressPrefix() {
        return Optional.ofNullable(this.destinationAddressPrefix);
    }

    /**
     * The destination address prefixes. CIDR or destination IP ranges.
     * 
     */
    @Import(name="destinationAddressPrefixes")
    private @Nullable Output> destinationAddressPrefixes;

    /**
     * @return The destination address prefixes. CIDR or destination IP ranges.
     * 
     */
    public Optional>> destinationAddressPrefixes() {
        return Optional.ofNullable(this.destinationAddressPrefixes);
    }

    /**
     * he destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
     * 
     */
    @Import(name="destinationPortRange")
    private @Nullable Output destinationPortRange;

    /**
     * @return he destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
     * 
     */
    public Optional> destinationPortRange() {
        return Optional.ofNullable(this.destinationPortRange);
    }

    /**
     * The destination port ranges.
     * 
     */
    @Import(name="destinationPortRanges")
    private @Nullable Output> destinationPortRanges;

    /**
     * @return The destination port ranges.
     * 
     */
    public Optional>> destinationPortRanges() {
        return Optional.ofNullable(this.destinationPortRanges);
    }

    /**
     * Network security rule direction.
     * 
     */
    @Import(name="direction", required=true)
    private Output> direction;

    /**
     * @return Network security rule direction.
     * 
     */
    public Output> direction() {
        return this.direction;
    }

    /**
     * Network security rule name.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return Network security rule name.
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * The priority of the rule. The value can be in the range 1000 to 3000. Values outside this range are reserved for Service Fabric ManagerCluster Resource Provider. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
     * 
     */
    @Import(name="priority", required=true)
    private Output priority;

    /**
     * @return The priority of the rule. The value can be in the range 1000 to 3000. Values outside this range are reserved for Service Fabric ManagerCluster Resource Provider. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
     * 
     */
    public Output priority() {
        return this.priority;
    }

    /**
     * Network protocol this rule applies to.
     * 
     */
    @Import(name="protocol", required=true)
    private Output> protocol;

    /**
     * @return Network protocol this rule applies to.
     * 
     */
    public Output> protocol() {
        return this.protocol;
    }

    /**
     * The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.
     * 
     */
    @Import(name="sourceAddressPrefix")
    private @Nullable Output sourceAddressPrefix;

    /**
     * @return The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.
     * 
     */
    public Optional> sourceAddressPrefix() {
        return Optional.ofNullable(this.sourceAddressPrefix);
    }

    /**
     * The CIDR or source IP ranges.
     * 
     */
    @Import(name="sourceAddressPrefixes")
    private @Nullable Output> sourceAddressPrefixes;

    /**
     * @return The CIDR or source IP ranges.
     * 
     */
    public Optional>> sourceAddressPrefixes() {
        return Optional.ofNullable(this.sourceAddressPrefixes);
    }

    /**
     * The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
     * 
     */
    @Import(name="sourcePortRange")
    private @Nullable Output sourcePortRange;

    /**
     * @return The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
     * 
     */
    public Optional> sourcePortRange() {
        return Optional.ofNullable(this.sourcePortRange);
    }

    /**
     * The source port ranges.
     * 
     */
    @Import(name="sourcePortRanges")
    private @Nullable Output> sourcePortRanges;

    /**
     * @return The source port ranges.
     * 
     */
    public Optional>> sourcePortRanges() {
        return Optional.ofNullable(this.sourcePortRanges);
    }

    private NetworkSecurityRuleArgs() {}

    private NetworkSecurityRuleArgs(NetworkSecurityRuleArgs $) {
        this.access = $.access;
        this.description = $.description;
        this.destinationAddressPrefix = $.destinationAddressPrefix;
        this.destinationAddressPrefixes = $.destinationAddressPrefixes;
        this.destinationPortRange = $.destinationPortRange;
        this.destinationPortRanges = $.destinationPortRanges;
        this.direction = $.direction;
        this.name = $.name;
        this.priority = $.priority;
        this.protocol = $.protocol;
        this.sourceAddressPrefix = $.sourceAddressPrefix;
        this.sourceAddressPrefixes = $.sourceAddressPrefixes;
        this.sourcePortRange = $.sourcePortRange;
        this.sourcePortRanges = $.sourcePortRanges;
    }

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

    public static final class Builder {
        private NetworkSecurityRuleArgs $;

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

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

        /**
         * @param access The network traffic is allowed or denied.
         * 
         * @return builder
         * 
         */
        public Builder access(Output> access) {
            $.access = access;
            return this;
        }

        /**
         * @param access The network traffic is allowed or denied.
         * 
         * @return builder
         * 
         */
        public Builder access(Either access) {
            return access(Output.of(access));
        }

        /**
         * @param access The network traffic is allowed or denied.
         * 
         * @return builder
         * 
         */
        public Builder access(String access) {
            return access(Either.ofLeft(access));
        }

        /**
         * @param access The network traffic is allowed or denied.
         * 
         * @return builder
         * 
         */
        public Builder access(Access access) {
            return access(Either.ofRight(access));
        }

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

        /**
         * @param description Network security rule description.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param destinationAddressPrefix The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
         * 
         * @return builder
         * 
         */
        public Builder destinationAddressPrefix(@Nullable Output destinationAddressPrefix) {
            $.destinationAddressPrefix = destinationAddressPrefix;
            return this;
        }

        /**
         * @param destinationAddressPrefix The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
         * 
         * @return builder
         * 
         */
        public Builder destinationAddressPrefix(String destinationAddressPrefix) {
            return destinationAddressPrefix(Output.of(destinationAddressPrefix));
        }

        /**
         * @param destinationAddressPrefixes The destination address prefixes. CIDR or destination IP ranges.
         * 
         * @return builder
         * 
         */
        public Builder destinationAddressPrefixes(@Nullable Output> destinationAddressPrefixes) {
            $.destinationAddressPrefixes = destinationAddressPrefixes;
            return this;
        }

        /**
         * @param destinationAddressPrefixes The destination address prefixes. CIDR or destination IP ranges.
         * 
         * @return builder
         * 
         */
        public Builder destinationAddressPrefixes(List destinationAddressPrefixes) {
            return destinationAddressPrefixes(Output.of(destinationAddressPrefixes));
        }

        /**
         * @param destinationAddressPrefixes The destination address prefixes. CIDR or destination IP ranges.
         * 
         * @return builder
         * 
         */
        public Builder destinationAddressPrefixes(String... destinationAddressPrefixes) {
            return destinationAddressPrefixes(List.of(destinationAddressPrefixes));
        }

        /**
         * @param destinationPortRange he destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
         * 
         * @return builder
         * 
         */
        public Builder destinationPortRange(@Nullable Output destinationPortRange) {
            $.destinationPortRange = destinationPortRange;
            return this;
        }

        /**
         * @param destinationPortRange he destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
         * 
         * @return builder
         * 
         */
        public Builder destinationPortRange(String destinationPortRange) {
            return destinationPortRange(Output.of(destinationPortRange));
        }

        /**
         * @param destinationPortRanges The destination port ranges.
         * 
         * @return builder
         * 
         */
        public Builder destinationPortRanges(@Nullable Output> destinationPortRanges) {
            $.destinationPortRanges = destinationPortRanges;
            return this;
        }

        /**
         * @param destinationPortRanges The destination port ranges.
         * 
         * @return builder
         * 
         */
        public Builder destinationPortRanges(List destinationPortRanges) {
            return destinationPortRanges(Output.of(destinationPortRanges));
        }

        /**
         * @param destinationPortRanges The destination port ranges.
         * 
         * @return builder
         * 
         */
        public Builder destinationPortRanges(String... destinationPortRanges) {
            return destinationPortRanges(List.of(destinationPortRanges));
        }

        /**
         * @param direction Network security rule direction.
         * 
         * @return builder
         * 
         */
        public Builder direction(Output> direction) {
            $.direction = direction;
            return this;
        }

        /**
         * @param direction Network security rule direction.
         * 
         * @return builder
         * 
         */
        public Builder direction(Either direction) {
            return direction(Output.of(direction));
        }

        /**
         * @param direction Network security rule direction.
         * 
         * @return builder
         * 
         */
        public Builder direction(String direction) {
            return direction(Either.ofLeft(direction));
        }

        /**
         * @param direction Network security rule direction.
         * 
         * @return builder
         * 
         */
        public Builder direction(Direction direction) {
            return direction(Either.ofRight(direction));
        }

        /**
         * @param name Network security rule name.
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Network security rule name.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param priority The priority of the rule. The value can be in the range 1000 to 3000. Values outside this range are reserved for Service Fabric ManagerCluster Resource Provider. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
         * 
         * @return builder
         * 
         */
        public Builder priority(Output priority) {
            $.priority = priority;
            return this;
        }

        /**
         * @param priority The priority of the rule. The value can be in the range 1000 to 3000. Values outside this range are reserved for Service Fabric ManagerCluster Resource Provider. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
         * 
         * @return builder
         * 
         */
        public Builder priority(Integer priority) {
            return priority(Output.of(priority));
        }

        /**
         * @param protocol Network protocol this rule applies to.
         * 
         * @return builder
         * 
         */
        public Builder protocol(Output> protocol) {
            $.protocol = protocol;
            return this;
        }

        /**
         * @param protocol Network protocol this rule applies to.
         * 
         * @return builder
         * 
         */
        public Builder protocol(Either protocol) {
            return protocol(Output.of(protocol));
        }

        /**
         * @param protocol Network protocol this rule applies to.
         * 
         * @return builder
         * 
         */
        public Builder protocol(String protocol) {
            return protocol(Either.ofLeft(protocol));
        }

        /**
         * @param protocol Network protocol this rule applies to.
         * 
         * @return builder
         * 
         */
        public Builder protocol(NsgProtocol protocol) {
            return protocol(Either.ofRight(protocol));
        }

        /**
         * @param sourceAddressPrefix The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.
         * 
         * @return builder
         * 
         */
        public Builder sourceAddressPrefix(@Nullable Output sourceAddressPrefix) {
            $.sourceAddressPrefix = sourceAddressPrefix;
            return this;
        }

        /**
         * @param sourceAddressPrefix The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.
         * 
         * @return builder
         * 
         */
        public Builder sourceAddressPrefix(String sourceAddressPrefix) {
            return sourceAddressPrefix(Output.of(sourceAddressPrefix));
        }

        /**
         * @param sourceAddressPrefixes The CIDR or source IP ranges.
         * 
         * @return builder
         * 
         */
        public Builder sourceAddressPrefixes(@Nullable Output> sourceAddressPrefixes) {
            $.sourceAddressPrefixes = sourceAddressPrefixes;
            return this;
        }

        /**
         * @param sourceAddressPrefixes The CIDR or source IP ranges.
         * 
         * @return builder
         * 
         */
        public Builder sourceAddressPrefixes(List sourceAddressPrefixes) {
            return sourceAddressPrefixes(Output.of(sourceAddressPrefixes));
        }

        /**
         * @param sourceAddressPrefixes The CIDR or source IP ranges.
         * 
         * @return builder
         * 
         */
        public Builder sourceAddressPrefixes(String... sourceAddressPrefixes) {
            return sourceAddressPrefixes(List.of(sourceAddressPrefixes));
        }

        /**
         * @param sourcePortRange The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
         * 
         * @return builder
         * 
         */
        public Builder sourcePortRange(@Nullable Output sourcePortRange) {
            $.sourcePortRange = sourcePortRange;
            return this;
        }

        /**
         * @param sourcePortRange The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
         * 
         * @return builder
         * 
         */
        public Builder sourcePortRange(String sourcePortRange) {
            return sourcePortRange(Output.of(sourcePortRange));
        }

        /**
         * @param sourcePortRanges The source port ranges.
         * 
         * @return builder
         * 
         */
        public Builder sourcePortRanges(@Nullable Output> sourcePortRanges) {
            $.sourcePortRanges = sourcePortRanges;
            return this;
        }

        /**
         * @param sourcePortRanges The source port ranges.
         * 
         * @return builder
         * 
         */
        public Builder sourcePortRanges(List sourcePortRanges) {
            return sourcePortRanges(Output.of(sourcePortRanges));
        }

        /**
         * @param sourcePortRanges The source port ranges.
         * 
         * @return builder
         * 
         */
        public Builder sourcePortRanges(String... sourcePortRanges) {
            return sourcePortRanges(List.of(sourcePortRanges));
        }

        public NetworkSecurityRuleArgs build() {
            if ($.access == null) {
                throw new MissingRequiredPropertyException("NetworkSecurityRuleArgs", "access");
            }
            if ($.direction == null) {
                throw new MissingRequiredPropertyException("NetworkSecurityRuleArgs", "direction");
            }
            if ($.name == null) {
                throw new MissingRequiredPropertyException("NetworkSecurityRuleArgs", "name");
            }
            if ($.priority == null) {
                throw new MissingRequiredPropertyException("NetworkSecurityRuleArgs", "priority");
            }
            if ($.protocol == null) {
                throw new MissingRequiredPropertyException("NetworkSecurityRuleArgs", "protocol");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy