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

com.pulumi.azurenative.network.AdminRuleArgs 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.network;

import com.pulumi.azurenative.network.enums.SecurityConfigurationRuleAccess;
import com.pulumi.azurenative.network.enums.SecurityConfigurationRuleDirection;
import com.pulumi.azurenative.network.enums.SecurityConfigurationRuleProtocol;
import com.pulumi.azurenative.network.inputs.AddressPrefixItemArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
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;


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

    public static final AdminRuleArgs Empty = new AdminRuleArgs();

    /**
     * Indicates the access allowed for this particular rule
     * 
     */
    @Import(name="access", required=true)
    private Output> access;

    /**
     * @return Indicates the access allowed for this particular rule
     * 
     */
    public Output> access() {
        return this.access;
    }

    /**
     * The name of the network manager Security Configuration.
     * 
     */
    @Import(name="configurationName", required=true)
    private Output configurationName;

    /**
     * @return The name of the network manager Security Configuration.
     * 
     */
    public Output configurationName() {
        return this.configurationName;
    }

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

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

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

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

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

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

    /**
     * Indicates if the traffic matched against the rule in inbound or outbound.
     * 
     */
    @Import(name="direction", required=true)
    private Output> direction;

    /**
     * @return Indicates if the traffic matched against the rule in inbound or outbound.
     * 
     */
    public Output> direction() {
        return this.direction;
    }

    /**
     * Whether the rule is custom or default.
     * Expected value is 'Custom'.
     * 
     */
    @Import(name="kind", required=true)
    private Output kind;

    /**
     * @return Whether the rule is custom or default.
     * Expected value is 'Custom'.
     * 
     */
    public Output kind() {
        return this.kind;
    }

    /**
     * The name of the network manager.
     * 
     */
    @Import(name="networkManagerName", required=true)
    private Output networkManagerName;

    /**
     * @return The name of the network manager.
     * 
     */
    public Output networkManagerName() {
        return this.networkManagerName;
    }

    /**
     * The priority of the rule. The value can be between 1 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", required=true)
    private Output priority;

    /**
     * @return The priority of the rule. The value can be between 1 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 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 name of the resource group.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The name of the network manager security Configuration rule collection.
     * 
     */
    @Import(name="ruleCollectionName", required=true)
    private Output ruleCollectionName;

    /**
     * @return The name of the network manager security Configuration rule collection.
     * 
     */
    public Output ruleCollectionName() {
        return this.ruleCollectionName;
    }

    /**
     * The name of the rule.
     * 
     */
    @Import(name="ruleName")
    private @Nullable Output ruleName;

    /**
     * @return The name of the rule.
     * 
     */
    public Optional> ruleName() {
        return Optional.ofNullable(this.ruleName);
    }

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

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

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

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

    private AdminRuleArgs() {}

    private AdminRuleArgs(AdminRuleArgs $) {
        this.access = $.access;
        this.configurationName = $.configurationName;
        this.description = $.description;
        this.destinationPortRanges = $.destinationPortRanges;
        this.destinations = $.destinations;
        this.direction = $.direction;
        this.kind = $.kind;
        this.networkManagerName = $.networkManagerName;
        this.priority = $.priority;
        this.protocol = $.protocol;
        this.resourceGroupName = $.resourceGroupName;
        this.ruleCollectionName = $.ruleCollectionName;
        this.ruleName = $.ruleName;
        this.sourcePortRanges = $.sourcePortRanges;
        this.sources = $.sources;
    }

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

    public static final class Builder {
        private AdminRuleArgs $;

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

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

        /**
         * @param access Indicates the access allowed for this particular rule
         * 
         * @return builder
         * 
         */
        public Builder access(Output> access) {
            $.access = access;
            return this;
        }

        /**
         * @param access Indicates the access allowed for this particular rule
         * 
         * @return builder
         * 
         */
        public Builder access(Either access) {
            return access(Output.of(access));
        }

        /**
         * @param access Indicates the access allowed for this particular rule
         * 
         * @return builder
         * 
         */
        public Builder access(String access) {
            return access(Either.ofLeft(access));
        }

        /**
         * @param access Indicates the access allowed for this particular rule
         * 
         * @return builder
         * 
         */
        public Builder access(SecurityConfigurationRuleAccess access) {
            return access(Either.ofRight(access));
        }

        /**
         * @param configurationName The name of the network manager Security Configuration.
         * 
         * @return builder
         * 
         */
        public Builder configurationName(Output configurationName) {
            $.configurationName = configurationName;
            return this;
        }

        /**
         * @param configurationName The name of the network manager Security Configuration.
         * 
         * @return builder
         * 
         */
        public Builder configurationName(String configurationName) {
            return configurationName(Output.of(configurationName));
        }

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

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

        /**
         * @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 destinations The destination address prefixes. CIDR or destination IP ranges.
         * 
         * @return builder
         * 
         */
        public Builder destinations(@Nullable Output> destinations) {
            $.destinations = destinations;
            return this;
        }

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

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

        /**
         * @param direction Indicates if the traffic matched against the rule in inbound or outbound.
         * 
         * @return builder
         * 
         */
        public Builder direction(Output> direction) {
            $.direction = direction;
            return this;
        }

        /**
         * @param direction Indicates if the traffic matched against the rule in inbound or outbound.
         * 
         * @return builder
         * 
         */
        public Builder direction(Either direction) {
            return direction(Output.of(direction));
        }

        /**
         * @param direction Indicates if the traffic matched against the rule in inbound or outbound.
         * 
         * @return builder
         * 
         */
        public Builder direction(String direction) {
            return direction(Either.ofLeft(direction));
        }

        /**
         * @param direction Indicates if the traffic matched against the rule in inbound or outbound.
         * 
         * @return builder
         * 
         */
        public Builder direction(SecurityConfigurationRuleDirection direction) {
            return direction(Either.ofRight(direction));
        }

        /**
         * @param kind Whether the rule is custom or default.
         * Expected value is 'Custom'.
         * 
         * @return builder
         * 
         */
        public Builder kind(Output kind) {
            $.kind = kind;
            return this;
        }

        /**
         * @param kind Whether the rule is custom or default.
         * Expected value is 'Custom'.
         * 
         * @return builder
         * 
         */
        public Builder kind(String kind) {
            return kind(Output.of(kind));
        }

        /**
         * @param networkManagerName The name of the network manager.
         * 
         * @return builder
         * 
         */
        public Builder networkManagerName(Output networkManagerName) {
            $.networkManagerName = networkManagerName;
            return this;
        }

        /**
         * @param networkManagerName The name of the network manager.
         * 
         * @return builder
         * 
         */
        public Builder networkManagerName(String networkManagerName) {
            return networkManagerName(Output.of(networkManagerName));
        }

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

        /**
         * @param priority The priority of the rule. The value can be between 1 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 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(SecurityConfigurationRuleProtocol protocol) {
            return protocol(Either.ofRight(protocol));
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param ruleCollectionName The name of the network manager security Configuration rule collection.
         * 
         * @return builder
         * 
         */
        public Builder ruleCollectionName(Output ruleCollectionName) {
            $.ruleCollectionName = ruleCollectionName;
            return this;
        }

        /**
         * @param ruleCollectionName The name of the network manager security Configuration rule collection.
         * 
         * @return builder
         * 
         */
        public Builder ruleCollectionName(String ruleCollectionName) {
            return ruleCollectionName(Output.of(ruleCollectionName));
        }

        /**
         * @param ruleName The name of the rule.
         * 
         * @return builder
         * 
         */
        public Builder ruleName(@Nullable Output ruleName) {
            $.ruleName = ruleName;
            return this;
        }

        /**
         * @param ruleName The name of the rule.
         * 
         * @return builder
         * 
         */
        public Builder ruleName(String ruleName) {
            return ruleName(Output.of(ruleName));
        }

        /**
         * @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));
        }

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

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

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

        public AdminRuleArgs build() {
            if ($.access == null) {
                throw new MissingRequiredPropertyException("AdminRuleArgs", "access");
            }
            if ($.configurationName == null) {
                throw new MissingRequiredPropertyException("AdminRuleArgs", "configurationName");
            }
            if ($.direction == null) {
                throw new MissingRequiredPropertyException("AdminRuleArgs", "direction");
            }
            $.kind = Codegen.stringProp("kind").output().arg($.kind).require();
            if ($.networkManagerName == null) {
                throw new MissingRequiredPropertyException("AdminRuleArgs", "networkManagerName");
            }
            if ($.priority == null) {
                throw new MissingRequiredPropertyException("AdminRuleArgs", "priority");
            }
            if ($.protocol == null) {
                throw new MissingRequiredPropertyException("AdminRuleArgs", "protocol");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("AdminRuleArgs", "resourceGroupName");
            }
            if ($.ruleCollectionName == null) {
                throw new MissingRequiredPropertyException("AdminRuleArgs", "ruleCollectionName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy