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

com.pulumi.azurenative.web.inputs.IpSecurityRestrictionArgs 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.web.inputs;

import com.pulumi.azurenative.web.enums.IpFilterTag;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * IP security restriction on an app.
 * 
 */
public final class IpSecurityRestrictionArgs extends com.pulumi.resources.ResourceArgs {

    public static final IpSecurityRestrictionArgs Empty = new IpSecurityRestrictionArgs();

    /**
     * Allow or Deny access for this IP range.
     * 
     */
    @Import(name="action")
    private @Nullable Output action;

    /**
     * @return Allow or Deny access for this IP range.
     * 
     */
    public Optional> action() {
        return Optional.ofNullable(this.action);
    }

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

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

    /**
     * IP restriction rule headers.
     * X-Forwarded-Host (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples).
     * The matching logic is ..
     * - If the property is null or empty (default), all hosts(or lack of) are allowed.
     * - A value is compared using ordinal-ignore-case (excluding port number).
     * - Subdomain wildcards are permitted but don't match the root domain. For example, *.contoso.com matches the subdomain foo.contoso.com
     *    but not the root domain contoso.com or multi-level foo.bar.contoso.com
     * - Unicode host names are allowed but are converted to Punycode for matching.
     * 
     * X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples).
     * The matching logic is ..
     * - If the property is null or empty (default), any forwarded-for chains (or lack of) are allowed.
     * - If any address (excluding port number) in the chain (comma separated) matches the CIDR defined by the property.
     * 
     * X-Azure-FDID and X-FD-HealthProbe.
     * The matching logic is exact match.
     * 
     */
    @Import(name="headers")
    private @Nullable Output>> headers;

    /**
     * @return IP restriction rule headers.
     * X-Forwarded-Host (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples).
     * The matching logic is ..
     * - If the property is null or empty (default), all hosts(or lack of) are allowed.
     * - A value is compared using ordinal-ignore-case (excluding port number).
     * - Subdomain wildcards are permitted but don't match the root domain. For example, *.contoso.com matches the subdomain foo.contoso.com
     *    but not the root domain contoso.com or multi-level foo.bar.contoso.com
     * - Unicode host names are allowed but are converted to Punycode for matching.
     * 
     * X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples).
     * The matching logic is ..
     * - If the property is null or empty (default), any forwarded-for chains (or lack of) are allowed.
     * - If any address (excluding port number) in the chain (comma separated) matches the CIDR defined by the property.
     * 
     * X-Azure-FDID and X-FD-HealthProbe.
     * The matching logic is exact match.
     * 
     */
    public Optional>>> headers() {
        return Optional.ofNullable(this.headers);
    }

    /**
     * IP address the security restriction is valid for.
     * It can be in form of pure ipv4 address (required SubnetMask property) or
     * CIDR notation such as ipv4/mask (leading bit match). For CIDR,
     * SubnetMask property must not be specified.
     * 
     */
    @Import(name="ipAddress")
    private @Nullable Output ipAddress;

    /**
     * @return IP address the security restriction is valid for.
     * It can be in form of pure ipv4 address (required SubnetMask property) or
     * CIDR notation such as ipv4/mask (leading bit match). For CIDR,
     * SubnetMask property must not be specified.
     * 
     */
    public Optional> ipAddress() {
        return Optional.ofNullable(this.ipAddress);
    }

    /**
     * IP restriction rule name.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return IP restriction rule name.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Priority of IP restriction rule.
     * 
     */
    @Import(name="priority")
    private @Nullable Output priority;

    /**
     * @return Priority of IP restriction rule.
     * 
     */
    public Optional> priority() {
        return Optional.ofNullable(this.priority);
    }

    /**
     * Subnet mask for the range of IP addresses the restriction is valid for.
     * 
     */
    @Import(name="subnetMask")
    private @Nullable Output subnetMask;

    /**
     * @return Subnet mask for the range of IP addresses the restriction is valid for.
     * 
     */
    public Optional> subnetMask() {
        return Optional.ofNullable(this.subnetMask);
    }

    /**
     * (internal) Subnet traffic tag
     * 
     */
    @Import(name="subnetTrafficTag")
    private @Nullable Output subnetTrafficTag;

    /**
     * @return (internal) Subnet traffic tag
     * 
     */
    public Optional> subnetTrafficTag() {
        return Optional.ofNullable(this.subnetTrafficTag);
    }

    /**
     * Defines what this IP filter will be used for. This is to support IP filtering on proxies.
     * 
     */
    @Import(name="tag")
    private @Nullable Output> tag;

    /**
     * @return Defines what this IP filter will be used for. This is to support IP filtering on proxies.
     * 
     */
    public Optional>> tag() {
        return Optional.ofNullable(this.tag);
    }

    /**
     * Virtual network resource id
     * 
     */
    @Import(name="vnetSubnetResourceId")
    private @Nullable Output vnetSubnetResourceId;

    /**
     * @return Virtual network resource id
     * 
     */
    public Optional> vnetSubnetResourceId() {
        return Optional.ofNullable(this.vnetSubnetResourceId);
    }

    /**
     * (internal) Vnet traffic tag
     * 
     */
    @Import(name="vnetTrafficTag")
    private @Nullable Output vnetTrafficTag;

    /**
     * @return (internal) Vnet traffic tag
     * 
     */
    public Optional> vnetTrafficTag() {
        return Optional.ofNullable(this.vnetTrafficTag);
    }

    private IpSecurityRestrictionArgs() {}

    private IpSecurityRestrictionArgs(IpSecurityRestrictionArgs $) {
        this.action = $.action;
        this.description = $.description;
        this.headers = $.headers;
        this.ipAddress = $.ipAddress;
        this.name = $.name;
        this.priority = $.priority;
        this.subnetMask = $.subnetMask;
        this.subnetTrafficTag = $.subnetTrafficTag;
        this.tag = $.tag;
        this.vnetSubnetResourceId = $.vnetSubnetResourceId;
        this.vnetTrafficTag = $.vnetTrafficTag;
    }

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

    public static final class Builder {
        private IpSecurityRestrictionArgs $;

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

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

        /**
         * @param action Allow or Deny access for this IP range.
         * 
         * @return builder
         * 
         */
        public Builder action(@Nullable Output action) {
            $.action = action;
            return this;
        }

        /**
         * @param action Allow or Deny access for this IP range.
         * 
         * @return builder
         * 
         */
        public Builder action(String action) {
            return action(Output.of(action));
        }

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

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

        /**
         * @param headers IP restriction rule headers.
         * X-Forwarded-Host (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples).
         * The matching logic is ..
         * - If the property is null or empty (default), all hosts(or lack of) are allowed.
         * - A value is compared using ordinal-ignore-case (excluding port number).
         * - Subdomain wildcards are permitted but don't match the root domain. For example, *.contoso.com matches the subdomain foo.contoso.com
         *    but not the root domain contoso.com or multi-level foo.bar.contoso.com
         * - Unicode host names are allowed but are converted to Punycode for matching.
         * 
         * X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples).
         * The matching logic is ..
         * - If the property is null or empty (default), any forwarded-for chains (or lack of) are allowed.
         * - If any address (excluding port number) in the chain (comma separated) matches the CIDR defined by the property.
         * 
         * X-Azure-FDID and X-FD-HealthProbe.
         * The matching logic is exact match.
         * 
         * @return builder
         * 
         */
        public Builder headers(@Nullable Output>> headers) {
            $.headers = headers;
            return this;
        }

        /**
         * @param headers IP restriction rule headers.
         * X-Forwarded-Host (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples).
         * The matching logic is ..
         * - If the property is null or empty (default), all hosts(or lack of) are allowed.
         * - A value is compared using ordinal-ignore-case (excluding port number).
         * - Subdomain wildcards are permitted but don't match the root domain. For example, *.contoso.com matches the subdomain foo.contoso.com
         *    but not the root domain contoso.com or multi-level foo.bar.contoso.com
         * - Unicode host names are allowed but are converted to Punycode for matching.
         * 
         * X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples).
         * The matching logic is ..
         * - If the property is null or empty (default), any forwarded-for chains (or lack of) are allowed.
         * - If any address (excluding port number) in the chain (comma separated) matches the CIDR defined by the property.
         * 
         * X-Azure-FDID and X-FD-HealthProbe.
         * The matching logic is exact match.
         * 
         * @return builder
         * 
         */
        public Builder headers(Map> headers) {
            return headers(Output.of(headers));
        }

        /**
         * @param ipAddress IP address the security restriction is valid for.
         * It can be in form of pure ipv4 address (required SubnetMask property) or
         * CIDR notation such as ipv4/mask (leading bit match). For CIDR,
         * SubnetMask property must not be specified.
         * 
         * @return builder
         * 
         */
        public Builder ipAddress(@Nullable Output ipAddress) {
            $.ipAddress = ipAddress;
            return this;
        }

        /**
         * @param ipAddress IP address the security restriction is valid for.
         * It can be in form of pure ipv4 address (required SubnetMask property) or
         * CIDR notation such as ipv4/mask (leading bit match). For CIDR,
         * SubnetMask property must not be specified.
         * 
         * @return builder
         * 
         */
        public Builder ipAddress(String ipAddress) {
            return ipAddress(Output.of(ipAddress));
        }

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

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

        /**
         * @param priority Priority of IP restriction rule.
         * 
         * @return builder
         * 
         */
        public Builder priority(@Nullable Output priority) {
            $.priority = priority;
            return this;
        }

        /**
         * @param priority Priority of IP restriction rule.
         * 
         * @return builder
         * 
         */
        public Builder priority(Integer priority) {
            return priority(Output.of(priority));
        }

        /**
         * @param subnetMask Subnet mask for the range of IP addresses the restriction is valid for.
         * 
         * @return builder
         * 
         */
        public Builder subnetMask(@Nullable Output subnetMask) {
            $.subnetMask = subnetMask;
            return this;
        }

        /**
         * @param subnetMask Subnet mask for the range of IP addresses the restriction is valid for.
         * 
         * @return builder
         * 
         */
        public Builder subnetMask(String subnetMask) {
            return subnetMask(Output.of(subnetMask));
        }

        /**
         * @param subnetTrafficTag (internal) Subnet traffic tag
         * 
         * @return builder
         * 
         */
        public Builder subnetTrafficTag(@Nullable Output subnetTrafficTag) {
            $.subnetTrafficTag = subnetTrafficTag;
            return this;
        }

        /**
         * @param subnetTrafficTag (internal) Subnet traffic tag
         * 
         * @return builder
         * 
         */
        public Builder subnetTrafficTag(Integer subnetTrafficTag) {
            return subnetTrafficTag(Output.of(subnetTrafficTag));
        }

        /**
         * @param tag Defines what this IP filter will be used for. This is to support IP filtering on proxies.
         * 
         * @return builder
         * 
         */
        public Builder tag(@Nullable Output> tag) {
            $.tag = tag;
            return this;
        }

        /**
         * @param tag Defines what this IP filter will be used for. This is to support IP filtering on proxies.
         * 
         * @return builder
         * 
         */
        public Builder tag(Either tag) {
            return tag(Output.of(tag));
        }

        /**
         * @param tag Defines what this IP filter will be used for. This is to support IP filtering on proxies.
         * 
         * @return builder
         * 
         */
        public Builder tag(String tag) {
            return tag(Either.ofLeft(tag));
        }

        /**
         * @param tag Defines what this IP filter will be used for. This is to support IP filtering on proxies.
         * 
         * @return builder
         * 
         */
        public Builder tag(IpFilterTag tag) {
            return tag(Either.ofRight(tag));
        }

        /**
         * @param vnetSubnetResourceId Virtual network resource id
         * 
         * @return builder
         * 
         */
        public Builder vnetSubnetResourceId(@Nullable Output vnetSubnetResourceId) {
            $.vnetSubnetResourceId = vnetSubnetResourceId;
            return this;
        }

        /**
         * @param vnetSubnetResourceId Virtual network resource id
         * 
         * @return builder
         * 
         */
        public Builder vnetSubnetResourceId(String vnetSubnetResourceId) {
            return vnetSubnetResourceId(Output.of(vnetSubnetResourceId));
        }

        /**
         * @param vnetTrafficTag (internal) Vnet traffic tag
         * 
         * @return builder
         * 
         */
        public Builder vnetTrafficTag(@Nullable Output vnetTrafficTag) {
            $.vnetTrafficTag = vnetTrafficTag;
            return this;
        }

        /**
         * @param vnetTrafficTag (internal) Vnet traffic tag
         * 
         * @return builder
         * 
         */
        public Builder vnetTrafficTag(Integer vnetTrafficTag) {
            return vnetTrafficTag(Output.of(vnetTrafficTag));
        }

        public IpSecurityRestrictionArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy