NetworkRule Class
- java.
lang. Object - com.
azure. resourcemanager. network. models. FirewallPolicyRule - com.
azure. resourcemanager. network. models. NetworkRule
- com.
- com.
public final class NetworkRule
extends FirewallPolicyRule
Rule of type network.
Constructor Summary
| Constructor | Description |
|---|---|
| NetworkRule() |
Creates an instance of Network |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| List<String> |
destinationAddresses()
Get the destination |
| List<String> |
destinationFqdns()
Get the destination |
| List<String> |
destinationIpGroups()
Get the destination |
| List<String> |
destinationPorts()
Get the destination |
|
static
Network |
fromJson(JsonReader jsonReader)
Reads an instance of Network |
|
List<Firewall |
ipProtocols()
Get the ip |
|
Firewall |
ruleType()
Get the rule |
| List<String> |
sourceAddresses()
Get the source |
| List<String> |
sourceIpGroups()
Get the source |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Network |
withDescription(String description)
Set the description property: Description of the rule. |
|
Network |
withDestinationAddresses(List<String> destinationAddresses)
Set the destination |
|
Network |
withDestinationFqdns(List<String> destinationFqdns)
Set the destination |
|
Network |
withDestinationIpGroups(List<String> destinationIpGroups)
Set the destination |
|
Network |
withDestinationPorts(List<String> destinationPorts)
Set the destination |
|
Network |
withIpProtocols(List<FirewallPolicyRuleNetworkProtocol> ipProtocols)
Set the ip |
|
Network |
withName(String name)
Set the name property: Name of the rule. |
|
Network |
withSourceAddresses(List<String> sourceAddresses)
Set the source |
|
Network |
withSourceIpGroups(List<String> sourceIpGroups)
Set the source |
Methods inherited from FirewallPolicyRule
Methods inherited from java.lang.Object
Constructor Details
NetworkRule
public NetworkRule()
Creates an instance of NetworkRule class.
Method Details
destinationAddresses
public List<String> destinationAddresses()
Get the destinationAddresses property: List of destination IP addresses or Service Tags.
Returns:
destinationFqdns
public List<String> destinationFqdns()
Get the destinationFqdns property: List of destination FQDNs.
Returns:
destinationIpGroups
public List<String> destinationIpGroups()
Get the destinationIpGroups property: List of destination IpGroups for this rule.
Returns:
destinationPorts
public List<String> destinationPorts()
Get the destinationPorts property: List of destination ports.
Returns:
fromJson
public static NetworkRule fromJson(JsonReader jsonReader)
Reads an instance of NetworkRule from the JsonReader.
Parameters:
Returns:
Throws:
ipProtocols
public List<FirewallPolicyRuleNetworkProtocol> ipProtocols()
Get the ipProtocols property: Array of FirewallPolicyRuleNetworkProtocols.
Returns:
ruleType
public FirewallPolicyRuleType ruleType()
Get the ruleType property: Rule Type.
Overrides:
NetworkRule.ruleType()Returns:
sourceAddresses
public List<String> sourceAddresses()
Get the sourceAddresses property: List of source IP addresses for this rule.
Returns:
sourceIpGroups
public List<String> sourceIpGroups()
Get the sourceIpGroups property: List of source IpGroups for this rule.
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
NetworkRule.toJson(JsonWriter jsonWriter)Parameters:
Throws:
validate
public void validate()
Validates the instance.
Overrides:
NetworkRule.validate()withDescription
public NetworkRule withDescription(String description)
Set the description property: Description of the rule.
Overrides:
NetworkRule.withDescription(String description)Parameters:
withDestinationAddresses
public NetworkRule withDestinationAddresses(List<String> destinationAddresses)
Set the destinationAddresses property: List of destination IP addresses or Service Tags.
Parameters:
Returns:
withDestinationFqdns
public NetworkRule withDestinationFqdns(List<String> destinationFqdns)
Set the destinationFqdns property: List of destination FQDNs.
Parameters:
Returns:
withDestinationIpGroups
public NetworkRule withDestinationIpGroups(List<String> destinationIpGroups)
Set the destinationIpGroups property: List of destination IpGroups for this rule.
Parameters:
Returns:
withDestinationPorts
public NetworkRule withDestinationPorts(List<String> destinationPorts)
Set the destinationPorts property: List of destination ports.
Parameters:
Returns:
withIpProtocols
public NetworkRule withIpProtocols(List<FirewallPolicyRuleNetworkProtocol> ipProtocols)
Set the ipProtocols property: Array of FirewallPolicyRuleNetworkProtocols.
Parameters:
Returns:
withName
public NetworkRule withName(String name)
Set the name property: Name of the rule.
Overrides:
NetworkRule.withName(String name)Parameters:
withSourceAddresses
public NetworkRule withSourceAddresses(List<String> sourceAddresses)
Set the sourceAddresses property: List of source IP addresses for this rule.
Parameters:
Returns:
withSourceIpGroups
public NetworkRule withSourceIpGroups(List<String> sourceIpGroups)
Set the sourceIpGroups property: List of source IpGroups for this rule.
Parameters:
Returns: