Class EffectiveNetworkSecurityRule
java.lang.Object
com.azure.resourcemanager.network.models.EffectiveNetworkSecurityRule
- All Implemented Interfaces:
com.azure.json.JsonSerializable<EffectiveNetworkSecurityRule>
public final class EffectiveNetworkSecurityRule
extends Object
implements com.azure.json.JsonSerializable<EffectiveNetworkSecurityRule>
Effective network security rules.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of EffectiveNetworkSecurityRule class. -
Method Summary
Modifier and TypeMethodDescriptionaccess()Get the access property: Whether network traffic is allowed or denied.Get the destinationAddressPrefix property: The destination address prefix.Get the destinationAddressPrefixes property: The destination address prefixes.Get the destinationPortRange property: The destination port or range.Get the destinationPortRanges property: The destination port ranges.Get the direction property: The direction of the rule.Get the expandedDestinationAddressPrefix property: Expanded destination address prefix.Get the expandedSourceAddressPrefix property: The expanded source address prefix.static EffectiveNetworkSecurityRulefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of EffectiveNetworkSecurityRule from the JsonReader.name()Get the name property: The name of the security rule specified by the user (if created by the user).priority()Get the priority property: The priority of the rule.protocol()Get the protocol property: The network protocol this rule applies to.Get the sourceAddressPrefix property: The source address prefix.Get the sourceAddressPrefixes property: The source address prefixes.Get the sourcePortRange property: The source port or range.Get the sourcePortRanges property: The source port ranges.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withAccess(SecurityRuleAccess access) Set the access property: Whether network traffic is allowed or denied.withDestinationAddressPrefix(String destinationAddressPrefix) Set the destinationAddressPrefix property: The destination address prefix.withDestinationAddressPrefixes(List<String> destinationAddressPrefixes) Set the destinationAddressPrefixes property: The destination address prefixes.withDestinationPortRange(String destinationPortRange) Set the destinationPortRange property: The destination port or range.withDestinationPortRanges(List<String> destinationPortRanges) Set the destinationPortRanges property: The destination port ranges.withDirection(SecurityRuleDirection direction) Set the direction property: The direction of the rule.withExpandedDestinationAddressPrefix(List<String> expandedDestinationAddressPrefix) Set the expandedDestinationAddressPrefix property: Expanded destination address prefix.withExpandedSourceAddressPrefix(List<String> expandedSourceAddressPrefix) Set the expandedSourceAddressPrefix property: The expanded source address prefix.Set the name property: The name of the security rule specified by the user (if created by the user).withPriority(Integer priority) Set the priority property: The priority of the rule.withProtocol(EffectiveSecurityRuleProtocol protocol) Set the protocol property: The network protocol this rule applies to.withSourceAddressPrefix(String sourceAddressPrefix) Set the sourceAddressPrefix property: The source address prefix.withSourceAddressPrefixes(List<String> sourceAddressPrefixes) Set the sourceAddressPrefixes property: The source address prefixes.withSourcePortRange(String sourcePortRange) Set the sourcePortRange property: The source port or range.withSourcePortRanges(List<String> sourcePortRanges) Set the sourcePortRanges property: The source port ranges.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
EffectiveNetworkSecurityRule
public EffectiveNetworkSecurityRule()Creates an instance of EffectiveNetworkSecurityRule class.
-
-
Method Details
-
name
Get the name property: The name of the security rule specified by the user (if created by the user).- Returns:
- the name value.
-
withName
Set the name property: The name of the security rule specified by the user (if created by the user).- Parameters:
name- the name value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
protocol
Get the protocol property: The network protocol this rule applies to.- Returns:
- the protocol value.
-
withProtocol
Set the protocol property: The network protocol this rule applies to.- Parameters:
protocol- the protocol value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
sourcePortRange
Get the sourcePortRange property: The source port or range.- Returns:
- the sourcePortRange value.
-
withSourcePortRange
Set the sourcePortRange property: The source port or range.- Parameters:
sourcePortRange- the sourcePortRange value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
destinationPortRange
Get the destinationPortRange property: The destination port or range.- Returns:
- the destinationPortRange value.
-
withDestinationPortRange
Set the destinationPortRange property: The destination port or range.- Parameters:
destinationPortRange- the destinationPortRange value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
sourcePortRanges
Get the sourcePortRanges property: The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*).- Returns:
- the sourcePortRanges value.
-
withSourcePortRanges
Set the sourcePortRanges property: The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*).- Parameters:
sourcePortRanges- the sourcePortRanges value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
destinationPortRanges
Get the destinationPortRanges property: The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*).- Returns:
- the destinationPortRanges value.
-
withDestinationPortRanges
Set the destinationPortRanges property: The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*).- Parameters:
destinationPortRanges- the destinationPortRanges value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
sourceAddressPrefix
Get the sourceAddressPrefix property: The source address prefix.- Returns:
- the sourceAddressPrefix value.
-
withSourceAddressPrefix
Set the sourceAddressPrefix property: The source address prefix.- Parameters:
sourceAddressPrefix- the sourceAddressPrefix value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
destinationAddressPrefix
Get the destinationAddressPrefix property: The destination address prefix.- Returns:
- the destinationAddressPrefix value.
-
withDestinationAddressPrefix
Set the destinationAddressPrefix property: The destination address prefix.- Parameters:
destinationAddressPrefix- the destinationAddressPrefix value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
sourceAddressPrefixes
Get the sourceAddressPrefixes property: The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).- Returns:
- the sourceAddressPrefixes value.
-
withSourceAddressPrefixes
Set the sourceAddressPrefixes property: The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).- Parameters:
sourceAddressPrefixes- the sourceAddressPrefixes value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
destinationAddressPrefixes
Get the destinationAddressPrefixes property: The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).- Returns:
- the destinationAddressPrefixes value.
-
withDestinationAddressPrefixes
public EffectiveNetworkSecurityRule withDestinationAddressPrefixes(List<String> destinationAddressPrefixes) Set the destinationAddressPrefixes property: The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).- Parameters:
destinationAddressPrefixes- the destinationAddressPrefixes value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
expandedSourceAddressPrefix
Get the expandedSourceAddressPrefix property: The expanded source address prefix.- Returns:
- the expandedSourceAddressPrefix value.
-
withExpandedSourceAddressPrefix
public EffectiveNetworkSecurityRule withExpandedSourceAddressPrefix(List<String> expandedSourceAddressPrefix) Set the expandedSourceAddressPrefix property: The expanded source address prefix.- Parameters:
expandedSourceAddressPrefix- the expandedSourceAddressPrefix value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
expandedDestinationAddressPrefix
Get the expandedDestinationAddressPrefix property: Expanded destination address prefix.- Returns:
- the expandedDestinationAddressPrefix value.
-
withExpandedDestinationAddressPrefix
public EffectiveNetworkSecurityRule withExpandedDestinationAddressPrefix(List<String> expandedDestinationAddressPrefix) Set the expandedDestinationAddressPrefix property: Expanded destination address prefix.- Parameters:
expandedDestinationAddressPrefix- the expandedDestinationAddressPrefix value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
access
Get the access property: Whether network traffic is allowed or denied.- Returns:
- the access value.
-
withAccess
Set the access property: Whether network traffic is allowed or denied.- Parameters:
access- the access value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
priority
Get the priority property: The priority of the rule.- Returns:
- the priority value.
-
withPriority
Set the priority property: The priority of the rule.- Parameters:
priority- the priority value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
direction
Get the direction property: The direction of the rule.- Returns:
- the direction value.
-
withDirection
Set the direction property: The direction of the rule.- Parameters:
direction- the direction value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<EffectiveNetworkSecurityRule>- Throws:
IOException
-
fromJson
public static EffectiveNetworkSecurityRule fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of EffectiveNetworkSecurityRule from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of EffectiveNetworkSecurityRule if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the EffectiveNetworkSecurityRule.
-