Class NetworkRule
- java.lang.Object
-
- com.azure.resourcemanager.network.models.FirewallPolicyRule
-
- com.azure.resourcemanager.network.models.NetworkRule
-
public final class NetworkRule extends FirewallPolicyRule
Rule of type network.
-
-
Constructor Summary
Constructors Constructor Description NetworkRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>destinationAddresses()Get the destinationAddresses property: List of destination IP addresses or Service Tags.List<String>destinationFqdns()Get the destinationFqdns property: List of destination FQDNs.List<String>destinationIpGroups()Get the destinationIpGroups property: List of destination IpGroups for this rule.List<String>destinationPorts()Get the destinationPorts property: List of destination ports.List<FirewallPolicyRuleNetworkProtocol>ipProtocols()Get the ipProtocols property: Array of FirewallPolicyRuleNetworkProtocols.List<String>sourceAddresses()Get the sourceAddresses property: List of source IP addresses for this rule.List<String>sourceIpGroups()Get the sourceIpGroups property: List of source IpGroups for this rule.voidvalidate()Validates the instance.NetworkRulewithDescription(String description)Set the description property: Description of the rule.NetworkRulewithDestinationAddresses(List<String> destinationAddresses)Set the destinationAddresses property: List of destination IP addresses or Service Tags.NetworkRulewithDestinationFqdns(List<String> destinationFqdns)Set the destinationFqdns property: List of destination FQDNs.NetworkRulewithDestinationIpGroups(List<String> destinationIpGroups)Set the destinationIpGroups property: List of destination IpGroups for this rule.NetworkRulewithDestinationPorts(List<String> destinationPorts)Set the destinationPorts property: List of destination ports.NetworkRulewithIpProtocols(List<FirewallPolicyRuleNetworkProtocol> ipProtocols)Set the ipProtocols property: Array of FirewallPolicyRuleNetworkProtocols.NetworkRulewithName(String name)Set the name property: Name of the rule.NetworkRulewithSourceAddresses(List<String> sourceAddresses)Set the sourceAddresses property: List of source IP addresses for this rule.NetworkRulewithSourceIpGroups(List<String> sourceIpGroups)Set the sourceIpGroups property: List of source IpGroups for this rule.-
Methods inherited from class com.azure.resourcemanager.network.models.FirewallPolicyRule
description, name
-
-
-
-
Method Detail
-
ipProtocols
public List<FirewallPolicyRuleNetworkProtocol> ipProtocols()
Get the ipProtocols property: Array of FirewallPolicyRuleNetworkProtocols.- Returns:
- the ipProtocols value.
-
withIpProtocols
public NetworkRule withIpProtocols(List<FirewallPolicyRuleNetworkProtocol> ipProtocols)
Set the ipProtocols property: Array of FirewallPolicyRuleNetworkProtocols.- Parameters:
ipProtocols- the ipProtocols value to set.- Returns:
- the NetworkRule object itself.
-
sourceAddresses
public List<String> sourceAddresses()
Get the sourceAddresses property: List of source IP addresses for this rule.- Returns:
- the sourceAddresses value.
-
withSourceAddresses
public NetworkRule withSourceAddresses(List<String> sourceAddresses)
Set the sourceAddresses property: List of source IP addresses for this rule.- Parameters:
sourceAddresses- the sourceAddresses value to set.- Returns:
- the NetworkRule object itself.
-
destinationAddresses
public List<String> destinationAddresses()
Get the destinationAddresses property: List of destination IP addresses or Service Tags.- Returns:
- the destinationAddresses value.
-
withDestinationAddresses
public NetworkRule withDestinationAddresses(List<String> destinationAddresses)
Set the destinationAddresses property: List of destination IP addresses or Service Tags.- Parameters:
destinationAddresses- the destinationAddresses value to set.- Returns:
- the NetworkRule object itself.
-
destinationPorts
public List<String> destinationPorts()
Get the destinationPorts property: List of destination ports.- Returns:
- the destinationPorts value.
-
withDestinationPorts
public NetworkRule withDestinationPorts(List<String> destinationPorts)
Set the destinationPorts property: List of destination ports.- Parameters:
destinationPorts- the destinationPorts value to set.- Returns:
- the NetworkRule object itself.
-
sourceIpGroups
public List<String> sourceIpGroups()
Get the sourceIpGroups property: List of source IpGroups for this rule.- Returns:
- the sourceIpGroups value.
-
withSourceIpGroups
public NetworkRule withSourceIpGroups(List<String> sourceIpGroups)
Set the sourceIpGroups property: List of source IpGroups for this rule.- Parameters:
sourceIpGroups- the sourceIpGroups value to set.- Returns:
- the NetworkRule object itself.
-
destinationIpGroups
public List<String> destinationIpGroups()
Get the destinationIpGroups property: List of destination IpGroups for this rule.- Returns:
- the destinationIpGroups value.
-
withDestinationIpGroups
public NetworkRule withDestinationIpGroups(List<String> destinationIpGroups)
Set the destinationIpGroups property: List of destination IpGroups for this rule.- Parameters:
destinationIpGroups- the destinationIpGroups value to set.- Returns:
- the NetworkRule object itself.
-
destinationFqdns
public List<String> destinationFqdns()
Get the destinationFqdns property: List of destination FQDNs.- Returns:
- the destinationFqdns value.
-
withDestinationFqdns
public NetworkRule withDestinationFqdns(List<String> destinationFqdns)
Set the destinationFqdns property: List of destination FQDNs.- Parameters:
destinationFqdns- the destinationFqdns value to set.- Returns:
- the NetworkRule object itself.
-
withName
public NetworkRule withName(String name)
Set the name property: Name of the rule.- Overrides:
withNamein classFirewallPolicyRule- Parameters:
name- the name value to set.- Returns:
- the FirewallPolicyRule object itself.
-
withDescription
public NetworkRule withDescription(String description)
Set the description property: Description of the rule.- Overrides:
withDescriptionin classFirewallPolicyRule- Parameters:
description- the description value to set.- Returns:
- the FirewallPolicyRule object itself.
-
validate
public void validate()
Validates the instance.- Overrides:
validatein classFirewallPolicyRule- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-