Class WindowsFirewallRule.Builder

    • Method Detail

      • action

        public WindowsFirewallRule.Builder action​(StateManagementSetting action)
        “The action the rule enforces. If not specified, the default is Allowed.”
        Parameters:
        action - value of action property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • description

        public WindowsFirewallRule.Builder description​(String description)
        “The description of the rule.”
        Parameters:
        description - value of description property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • displayName

        public WindowsFirewallRule.Builder displayName​(String displayName)
        “The display name of the rule. Does not need to be unique.”
        Parameters:
        displayName - value of displayName property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • edgeTraversal

        public WindowsFirewallRule.Builder edgeTraversal​(StateManagementSetting edgeTraversal)
        “Indicates whether edge traversal is enabled or disabled for this rule. The EdgeTraversal setting indicates that specific inbound traffic is allowed to tunnel through NATs and other edge devices using the Teredo tunneling technology . In order for this setting to work correctly, the application or service with the inbound firewall rule needs to support IPv6. The primary application of this setting allows listeners on the host to be globally addressable through a Teredo IPv6 address. New rules have the EdgeTraversal property disabled by default.”
        Parameters:
        edgeTraversal - value of edgeTraversal property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • filePath

        public WindowsFirewallRule.Builder filePath​(String filePath)
        “The full file path of an app that's affected by the firewall rule.”
        Parameters:
        filePath - value of filePath property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • localAddressRanges

        public WindowsFirewallRule.Builder localAddressRanges​(List<String> localAddressRanges)
        “List of local addresses covered by the rule. Default is any address. Valid tokens include:&lt;ul&gt;&lt;li&gt;"*" indicates any local address. If present, this must be the only token included.&lt;/li&gt;&lt;li&gt;A subnet can be specified using either the subnet mask or network prefix notation. If neither a subnet mask nor a network prefix is specified, the subnet mask defaults to 255.255.255.255.&lt;/li&gt;&lt;li&gt;A valid IPv6 address.&lt;/li&gt;&lt;li&gt;An IPv4 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;li&gt;An IPv6 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;/ul&gt;”
        Parameters:
        localAddressRanges - value of localAddressRanges property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • localAddressRanges

        public WindowsFirewallRule.Builder localAddressRanges​(String... localAddressRanges)
        “List of local addresses covered by the rule. Default is any address. Valid tokens include:&lt;ul&gt;&lt;li&gt;"*" indicates any local address. If present, this must be the only token included.&lt;/li&gt;&lt;li&gt;A subnet can be specified using either the subnet mask or network prefix notation. If neither a subnet mask nor a network prefix is specified, the subnet mask defaults to 255.255.255.255.&lt;/li&gt;&lt;li&gt;A valid IPv6 address.&lt;/li&gt;&lt;li&gt;An IPv4 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;li&gt;An IPv6 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;/ul&gt;”
        Parameters:
        localAddressRanges - value of localAddressRanges property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • localAddressRangesNextLink

        public WindowsFirewallRule.Builder localAddressRangesNextLink​(String localAddressRangesNextLink)
        “List of local addresses covered by the rule. Default is any address. Valid tokens include:&lt;ul&gt;&lt;li&gt;"*" indicates any local address. If present, this must be the only token included.&lt;/li&gt;&lt;li&gt;A subnet can be specified using either the subnet mask or network prefix notation. If neither a subnet mask nor a network prefix is specified, the subnet mask defaults to 255.255.255.255.&lt;/li&gt;&lt;li&gt;A valid IPv6 address.&lt;/li&gt;&lt;li&gt;An IPv4 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;li&gt;An IPv6 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;/ul&gt;”
        Parameters:
        localAddressRangesNextLink - value of localAddressRanges@nextLink property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • localPortRanges

        public WindowsFirewallRule.Builder localPortRanges​(List<String> localPortRanges)
        “List of local port ranges. For example, "100-120", "200", "300-320". If not specified, the default is All.”
        Parameters:
        localPortRanges - value of localPortRanges property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • localPortRanges

        public WindowsFirewallRule.Builder localPortRanges​(String... localPortRanges)
        “List of local port ranges. For example, "100-120", "200", "300-320". If not specified, the default is All.”
        Parameters:
        localPortRanges - value of localPortRanges property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • localPortRangesNextLink

        public WindowsFirewallRule.Builder localPortRangesNextLink​(String localPortRangesNextLink)
        “List of local port ranges. For example, "100-120", "200", "300-320". If not specified, the default is All.”
        Parameters:
        localPortRangesNextLink - value of localPortRanges@nextLink property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • localUserAuthorizations

        public WindowsFirewallRule.Builder localUserAuthorizations​(String localUserAuthorizations)
        “Specifies the list of authorized local users for the app container. This is a string in Security Descriptor Definition Language (SDDL) format.”
        Parameters:
        localUserAuthorizations - value of localUserAuthorizations property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • packageFamilyName

        public WindowsFirewallRule.Builder packageFamilyName​(String packageFamilyName)
        “The package family name of a Microsoft Store application that's affected by the firewall rule.”
        Parameters:
        packageFamilyName - value of packageFamilyName property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • profileTypes

        public WindowsFirewallRule.Builder profileTypes​(WindowsFirewallRuleNetworkProfileTypes profileTypes)
        “Specifies the profiles to which the rule belongs. If not specified, the default is All.”
        Parameters:
        profileTypes - value of profileTypes property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • protocol

        public WindowsFirewallRule.Builder protocol​(Integer protocol)
        “0-255 number representing the IP protocol (TCP = 6, UDP = 17). If not specified, the default is All. Valid values 0 to 255”
        Parameters:
        protocol - value of protocol property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • remoteAddressRanges

        public WindowsFirewallRule.Builder remoteAddressRanges​(List<String> remoteAddressRanges)
        “List of tokens specifying the remote addresses covered by the rule. Tokens are case insensitive. Default is any address. Valid tokens include:&lt;ul&gt;&lt;li&gt;"*" indicates any remote address. If present, this must be the only token included.&lt; /li&gt;&lt;li&gt;"Defaultgateway"&lt;/li&gt;&lt;li&gt;"DHCP"&lt;/li&gt;&lt;li&gt;"DNS"&lt;/li&gt;&lt;li&gt;"WINS"&lt;/li&gt;&lt;li&gt;" Intranet" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;"RmtIntranet" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;"Internet" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;"Ply2Renders" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;" LocalSubnet" indicates any local address on the local subnet.&lt;/li&gt;&lt;li&gt;A subnet can be specified using either the subnet mask or network prefix notation. If neither a subnet mask nor a network prefix is specified, the subnet mask defaults to 255.255.255.255.&lt;/li&gt;&lt;li&gt;A valid IPv6 address.&lt;/li&gt;&lt;li&gt;An IPv4 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;li&gt;An IPv6 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;/ul&gt;”
        Parameters:
        remoteAddressRanges - value of remoteAddressRanges property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • remoteAddressRanges

        public WindowsFirewallRule.Builder remoteAddressRanges​(String... remoteAddressRanges)
        “List of tokens specifying the remote addresses covered by the rule. Tokens are case insensitive. Default is any address. Valid tokens include:&lt;ul&gt;&lt;li&gt;"*" indicates any remote address. If present, this must be the only token included.&lt; /li&gt;&lt;li&gt;"Defaultgateway"&lt;/li&gt;&lt;li&gt;"DHCP"&lt;/li&gt;&lt;li&gt;"DNS"&lt;/li&gt;&lt;li&gt;"WINS"&lt;/li&gt;&lt;li&gt;" Intranet" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;"RmtIntranet" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;"Internet" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;"Ply2Renders" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;" LocalSubnet" indicates any local address on the local subnet.&lt;/li&gt;&lt;li&gt;A subnet can be specified using either the subnet mask or network prefix notation. If neither a subnet mask nor a network prefix is specified, the subnet mask defaults to 255.255.255.255.&lt;/li&gt;&lt;li&gt;A valid IPv6 address.&lt;/li&gt;&lt;li&gt;An IPv4 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;li&gt;An IPv6 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;/ul&gt;”
        Parameters:
        remoteAddressRanges - value of remoteAddressRanges property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • remoteAddressRangesNextLink

        public WindowsFirewallRule.Builder remoteAddressRangesNextLink​(String remoteAddressRangesNextLink)
        “List of tokens specifying the remote addresses covered by the rule. Tokens are case insensitive. Default is any address. Valid tokens include:&lt;ul&gt;&lt;li&gt;"*" indicates any remote address. If present, this must be the only token included.&lt; /li&gt;&lt;li&gt;"Defaultgateway"&lt;/li&gt;&lt;li&gt;"DHCP"&lt;/li&gt;&lt;li&gt;"DNS"&lt;/li&gt;&lt;li&gt;"WINS"&lt;/li&gt;&lt;li&gt;" Intranet" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;"RmtIntranet" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;"Internet" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;"Ply2Renders" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;" LocalSubnet" indicates any local address on the local subnet.&lt;/li&gt;&lt;li&gt;A subnet can be specified using either the subnet mask or network prefix notation. If neither a subnet mask nor a network prefix is specified, the subnet mask defaults to 255.255.255.255.&lt;/li&gt;&lt;li&gt;A valid IPv6 address.&lt;/li&gt;&lt;li&gt;An IPv4 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;li&gt;An IPv6 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;/ul&gt;”
        Parameters:
        remoteAddressRangesNextLink - value of remoteAddressRanges@nextLink property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • remotePortRanges

        public WindowsFirewallRule.Builder remotePortRanges​(List<String> remotePortRanges)
        “List of remote port ranges. For example, "100-120", "200", "300-320". If not specified, the default is All.”
        Parameters:
        remotePortRanges - value of remotePortRanges property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • remotePortRanges

        public WindowsFirewallRule.Builder remotePortRanges​(String... remotePortRanges)
        “List of remote port ranges. For example, "100-120", "200", "300-320". If not specified, the default is All.”
        Parameters:
        remotePortRanges - value of remotePortRanges property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • remotePortRangesNextLink

        public WindowsFirewallRule.Builder remotePortRangesNextLink​(String remotePortRangesNextLink)
        “List of remote port ranges. For example, "100-120", "200", "300-320". If not specified, the default is All.”
        Parameters:
        remotePortRangesNextLink - value of remotePortRanges@nextLink property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • serviceName

        public WindowsFirewallRule.Builder serviceName​(String serviceName)
        “The name used in cases when a service, not an application, is sending or receiving traffic.”
        Parameters:
        serviceName - value of serviceName property (as defined in service metadata)
        Returns:
        this (for method chaining)
      • trafficDirection

        public WindowsFirewallRule.Builder trafficDirection​(WindowsFirewallRuleTrafficDirectionType trafficDirection)
        “The traffic direction that the rule is enabled for. If not specified, the default is Out.”
        Parameters:
        trafficDirection - value of trafficDirection property (as defined in service metadata)
        Returns:
        this (for method chaining)