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

com.pulumi.azurenative.app.inputs.IpSecurityRestrictionRuleArgs 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.app.inputs;

import com.pulumi.azurenative.app.enums.Action;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Rule to restrict incoming IP address.
 * 
 */
public final class IpSecurityRestrictionRuleArgs extends com.pulumi.resources.ResourceArgs {

    public static final IpSecurityRestrictionRuleArgs Empty = new IpSecurityRestrictionRuleArgs();

    /**
     * Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny
     * 
     */
    @Import(name="action", required=true)
    private Output> action;

    /**
     * @return Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny
     * 
     */
    public Output> action() {
        return this.action;
    }

    /**
     * Describe the IP restriction rule that is being sent to the container-app. This is an optional field.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Describe the IP restriction rule that is being sent to the container-app. This is an optional field.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * CIDR notation to match incoming IP address
     * 
     */
    @Import(name="ipAddressRange", required=true)
    private Output ipAddressRange;

    /**
     * @return CIDR notation to match incoming IP address
     * 
     */
    public Output ipAddressRange() {
        return this.ipAddressRange;
    }

    /**
     * Name for the IP restriction rule.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return Name for the IP restriction rule.
     * 
     */
    public Output name() {
        return this.name;
    }

    private IpSecurityRestrictionRuleArgs() {}

    private IpSecurityRestrictionRuleArgs(IpSecurityRestrictionRuleArgs $) {
        this.action = $.action;
        this.description = $.description;
        this.ipAddressRange = $.ipAddressRange;
        this.name = $.name;
    }

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

    public static final class Builder {
        private IpSecurityRestrictionRuleArgs $;

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

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

        /**
         * @param action Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny
         * 
         * @return builder
         * 
         */
        public Builder action(Output> action) {
            $.action = action;
            return this;
        }

        /**
         * @param action Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny
         * 
         * @return builder
         * 
         */
        public Builder action(Either action) {
            return action(Output.of(action));
        }

        /**
         * @param action Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny
         * 
         * @return builder
         * 
         */
        public Builder action(String action) {
            return action(Either.ofLeft(action));
        }

        /**
         * @param action Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny
         * 
         * @return builder
         * 
         */
        public Builder action(Action action) {
            return action(Either.ofRight(action));
        }

        /**
         * @param description Describe the IP restriction rule that is being sent to the container-app. This is an optional field.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Describe the IP restriction rule that is being sent to the container-app. This is an optional field.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param ipAddressRange CIDR notation to match incoming IP address
         * 
         * @return builder
         * 
         */
        public Builder ipAddressRange(Output ipAddressRange) {
            $.ipAddressRange = ipAddressRange;
            return this;
        }

        /**
         * @param ipAddressRange CIDR notation to match incoming IP address
         * 
         * @return builder
         * 
         */
        public Builder ipAddressRange(String ipAddressRange) {
            return ipAddressRange(Output.of(ipAddressRange));
        }

        /**
         * @param name Name for the IP restriction rule.
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name for the IP restriction rule.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        public IpSecurityRestrictionRuleArgs build() {
            if ($.action == null) {
                throw new MissingRequiredPropertyException("IpSecurityRestrictionRuleArgs", "action");
            }
            if ($.ipAddressRange == null) {
                throw new MissingRequiredPropertyException("IpSecurityRestrictionRuleArgs", "ipAddressRange");
            }
            if ($.name == null) {
                throw new MissingRequiredPropertyException("IpSecurityRestrictionRuleArgs", "name");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy