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

com.pulumi.azurenative.migrate.inputs.NsgSecurityRuleArgs 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.migrate.inputs;

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


/**
 * Security Rule data model for Network Security Groups.
 * 
 */
public final class NsgSecurityRuleArgs extends com.pulumi.resources.ResourceArgs {

    public static final NsgSecurityRuleArgs Empty = new NsgSecurityRuleArgs();

    /**
     * Gets or sets whether network traffic is allowed or denied.
     * Possible values are “Allow” and “Deny”.
     * 
     */
    @Import(name="access")
    private @Nullable Output access;

    /**
     * @return Gets or sets whether network traffic is allowed or denied.
     * Possible values are “Allow” and “Deny”.
     * 
     */
    public Optional> access() {
        return Optional.ofNullable(this.access);
    }

    /**
     * Gets or sets a description for this rule. Restricted to 140 chars.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Gets or sets a description for this rule. Restricted to 140 chars.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Gets or sets destination address prefix. CIDR or source IP range.
     *  A “*” 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 Gets or sets destination address prefix. CIDR or source IP range.
     *  A “*” 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);
    }

    /**
     * Gets or sets Destination Port or Range. Integer or range between
     * 0 and 65535. A “*” can also be used to match all ports.
     * 
     */
    @Import(name="destinationPortRange")
    private @Nullable Output destinationPortRange;

    /**
     * @return Gets or sets Destination Port or Range. Integer or range between
     * 0 and 65535. A “*” can also be used to match all ports.
     * 
     */
    public Optional> destinationPortRange() {
        return Optional.ofNullable(this.destinationPortRange);
    }

    /**
     * Gets or sets the direction of the rule.InBound or Outbound. The
     * direction specifies if rule will be evaluated on incoming or outgoing traffic.
     * 
     */
    @Import(name="direction")
    private @Nullable Output direction;

    /**
     * @return Gets or sets the direction of the rule.InBound or Outbound. The
     * direction specifies if rule will be evaluated on incoming or outgoing traffic.
     * 
     */
    public Optional> direction() {
        return Optional.ofNullable(this.direction);
    }

    /**
     * Gets or sets the Security rule name.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Gets or sets the Security rule name.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Gets or sets the priority of the rule. The value can be between
     * 100 and 4096. 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")
    private @Nullable Output priority;

    /**
     * @return Gets or sets the priority of the rule. The value can be between
     * 100 and 4096. 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 Optional> priority() {
        return Optional.ofNullable(this.priority);
    }

    /**
     * Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*).
     * 
     */
    @Import(name="protocol")
    private @Nullable Output protocol;

    /**
     * @return Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*).
     * 
     */
    public Optional> protocol() {
        return Optional.ofNullable(this.protocol);
    }

    /**
     * Gets or sets source address prefix. CIDR or source IP range. A
     * “*” 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 Gets or sets source address prefix. CIDR or source IP range. A
     * “*” 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);
    }

    /**
     * Gets or sets Source Port or Range. Integer or range between 0 and
     * 65535. A “*” can also be used to match all ports.
     * 
     */
    @Import(name="sourcePortRange")
    private @Nullable Output sourcePortRange;

    /**
     * @return Gets or sets Source Port or Range. Integer or range between 0 and
     * 65535. A “*” can also be used to match all ports.
     * 
     */
    public Optional> sourcePortRange() {
        return Optional.ofNullable(this.sourcePortRange);
    }

    private NsgSecurityRuleArgs() {}

    private NsgSecurityRuleArgs(NsgSecurityRuleArgs $) {
        this.access = $.access;
        this.description = $.description;
        this.destinationAddressPrefix = $.destinationAddressPrefix;
        this.destinationPortRange = $.destinationPortRange;
        this.direction = $.direction;
        this.name = $.name;
        this.priority = $.priority;
        this.protocol = $.protocol;
        this.sourceAddressPrefix = $.sourceAddressPrefix;
        this.sourcePortRange = $.sourcePortRange;
    }

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

    public static final class Builder {
        private NsgSecurityRuleArgs $;

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

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

        /**
         * @param access Gets or sets whether network traffic is allowed or denied.
         * Possible values are “Allow” and “Deny”.
         * 
         * @return builder
         * 
         */
        public Builder access(@Nullable Output access) {
            $.access = access;
            return this;
        }

        /**
         * @param access Gets or sets whether network traffic is allowed or denied.
         * Possible values are “Allow” and “Deny”.
         * 
         * @return builder
         * 
         */
        public Builder access(String access) {
            return access(Output.of(access));
        }

        /**
         * @param description Gets or sets a description for this rule. Restricted to 140 chars.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Gets or sets a description for this rule. Restricted to 140 chars.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param destinationAddressPrefix Gets or sets destination address prefix. CIDR or source IP range.
         *  A “*” 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 Gets or sets destination address prefix. CIDR or source IP range.
         *  A “*” 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 destinationPortRange Gets or sets Destination Port or Range. Integer or range between
         * 0 and 65535. A “*” can also be used to match all ports.
         * 
         * @return builder
         * 
         */
        public Builder destinationPortRange(@Nullable Output destinationPortRange) {
            $.destinationPortRange = destinationPortRange;
            return this;
        }

        /**
         * @param destinationPortRange Gets or sets Destination Port or Range. Integer or range between
         * 0 and 65535. A “*” can also be used to match all ports.
         * 
         * @return builder
         * 
         */
        public Builder destinationPortRange(String destinationPortRange) {
            return destinationPortRange(Output.of(destinationPortRange));
        }

        /**
         * @param direction Gets or sets the direction of the rule.InBound or Outbound. The
         * direction specifies if rule will be evaluated on incoming or outgoing traffic.
         * 
         * @return builder
         * 
         */
        public Builder direction(@Nullable Output direction) {
            $.direction = direction;
            return this;
        }

        /**
         * @param direction Gets or sets the direction of the rule.InBound or Outbound. The
         * direction specifies if rule will be evaluated on incoming or outgoing traffic.
         * 
         * @return builder
         * 
         */
        public Builder direction(String direction) {
            return direction(Output.of(direction));
        }

        /**
         * @param name Gets or sets the Security rule name.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Gets or sets the Security rule name.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param priority Gets or sets the priority of the rule. The value can be between
         * 100 and 4096. 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(@Nullable Output priority) {
            $.priority = priority;
            return this;
        }

        /**
         * @param priority Gets or sets the priority of the rule. The value can be between
         * 100 and 4096. 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 Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*).
         * 
         * @return builder
         * 
         */
        public Builder protocol(@Nullable Output protocol) {
            $.protocol = protocol;
            return this;
        }

        /**
         * @param protocol Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*).
         * 
         * @return builder
         * 
         */
        public Builder protocol(String protocol) {
            return protocol(Output.of(protocol));
        }

        /**
         * @param sourceAddressPrefix Gets or sets source address prefix. CIDR or source IP range. A
         * “*” 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 Gets or sets source address prefix. CIDR or source IP range. A
         * “*” 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 sourcePortRange Gets or sets Source Port or Range. Integer or range between 0 and
         * 65535. A “*” can also be used to match all ports.
         * 
         * @return builder
         * 
         */
        public Builder sourcePortRange(@Nullable Output sourcePortRange) {
            $.sourcePortRange = sourcePortRange;
            return this;
        }

        /**
         * @param sourcePortRange Gets or sets Source Port or Range. Integer or range between 0 and
         * 65535. A “*” can also be used to match all ports.
         * 
         * @return builder
         * 
         */
        public Builder sourcePortRange(String sourcePortRange) {
            return sourcePortRange(Output.of(sourcePortRange));
        }

        public NsgSecurityRuleArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy