Class EffectiveNetworkSecurityRule
- java.lang.Object
-
- com.azure.resourcemanager.network.models.EffectiveNetworkSecurityRule
-
public final class EffectiveNetworkSecurityRule extends Object
Effective network security rules.
-
-
Constructor Summary
Constructors Constructor Description EffectiveNetworkSecurityRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SecurityRuleAccessaccess()Get the access property: Whether network traffic is allowed or denied.StringdestinationAddressPrefix()Get the destinationAddressPrefix property: The destination address prefix.List<String>destinationAddressPrefixes()Get the destinationAddressPrefixes property: The destination address prefixes.StringdestinationPortRange()Get the destinationPortRange property: The destination port or range.List<String>destinationPortRanges()Get the destinationPortRanges property: The destination port ranges.SecurityRuleDirectiondirection()Get the direction property: The direction of the rule.List<String>expandedDestinationAddressPrefix()Get the expandedDestinationAddressPrefix property: Expanded destination address prefix.List<String>expandedSourceAddressPrefix()Get the expandedSourceAddressPrefix property: The expanded source address prefix.Stringname()Get the name property: The name of the security rule specified by the user (if created by the user).Integerpriority()Get the priority property: The priority of the rule.EffectiveSecurityRuleProtocolprotocol()Get the protocol property: The network protocol this rule applies to.StringsourceAddressPrefix()Get the sourceAddressPrefix property: The source address prefix.List<String>sourceAddressPrefixes()Get the sourceAddressPrefixes property: The source address prefixes.StringsourcePortRange()Get the sourcePortRange property: The source port or range.List<String>sourcePortRanges()Get the sourcePortRanges property: The source port ranges.voidvalidate()Validates the instance.EffectiveNetworkSecurityRulewithAccess(SecurityRuleAccess access)Set the access property: Whether network traffic is allowed or denied.EffectiveNetworkSecurityRulewithDestinationAddressPrefix(String destinationAddressPrefix)Set the destinationAddressPrefix property: The destination address prefix.EffectiveNetworkSecurityRulewithDestinationAddressPrefixes(List<String> destinationAddressPrefixes)Set the destinationAddressPrefixes property: The destination address prefixes.EffectiveNetworkSecurityRulewithDestinationPortRange(String destinationPortRange)Set the destinationPortRange property: The destination port or range.EffectiveNetworkSecurityRulewithDestinationPortRanges(List<String> destinationPortRanges)Set the destinationPortRanges property: The destination port ranges.EffectiveNetworkSecurityRulewithDirection(SecurityRuleDirection direction)Set the direction property: The direction of the rule.EffectiveNetworkSecurityRulewithExpandedDestinationAddressPrefix(List<String> expandedDestinationAddressPrefix)Set the expandedDestinationAddressPrefix property: Expanded destination address prefix.EffectiveNetworkSecurityRulewithExpandedSourceAddressPrefix(List<String> expandedSourceAddressPrefix)Set the expandedSourceAddressPrefix property: The expanded source address prefix.EffectiveNetworkSecurityRulewithName(String name)Set the name property: The name of the security rule specified by the user (if created by the user).EffectiveNetworkSecurityRulewithPriority(Integer priority)Set the priority property: The priority of the rule.EffectiveNetworkSecurityRulewithProtocol(EffectiveSecurityRuleProtocol protocol)Set the protocol property: The network protocol this rule applies to.EffectiveNetworkSecurityRulewithSourceAddressPrefix(String sourceAddressPrefix)Set the sourceAddressPrefix property: The source address prefix.EffectiveNetworkSecurityRulewithSourceAddressPrefixes(List<String> sourceAddressPrefixes)Set the sourceAddressPrefixes property: The source address prefixes.EffectiveNetworkSecurityRulewithSourcePortRange(String sourcePortRange)Set the sourcePortRange property: The source port or range.EffectiveNetworkSecurityRulewithSourcePortRanges(List<String> sourcePortRanges)Set the sourcePortRanges property: The source port ranges.
-
-
-
Method Detail
-
name
public String 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
public EffectiveNetworkSecurityRule withName(String name)
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
public EffectiveSecurityRuleProtocol protocol()
Get the protocol property: The network protocol this rule applies to.- Returns:
- the protocol value.
-
withProtocol
public EffectiveNetworkSecurityRule withProtocol(EffectiveSecurityRuleProtocol protocol)
Set the protocol property: The network protocol this rule applies to.- Parameters:
protocol- the protocol value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
sourcePortRange
public String sourcePortRange()
Get the sourcePortRange property: The source port or range.- Returns:
- the sourcePortRange value.
-
withSourcePortRange
public EffectiveNetworkSecurityRule withSourcePortRange(String sourcePortRange)
Set the sourcePortRange property: The source port or range.- Parameters:
sourcePortRange- the sourcePortRange value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
destinationPortRange
public String destinationPortRange()
Get the destinationPortRange property: The destination port or range.- Returns:
- the destinationPortRange value.
-
withDestinationPortRange
public EffectiveNetworkSecurityRule withDestinationPortRange(String destinationPortRange)
Set the destinationPortRange property: The destination port or range.- Parameters:
destinationPortRange- the destinationPortRange value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
sourcePortRanges
public List<String> 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
public EffectiveNetworkSecurityRule withSourcePortRanges(List<String> sourcePortRanges)
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
public List<String> 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
public EffectiveNetworkSecurityRule withDestinationPortRanges(List<String> destinationPortRanges)
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
public String sourceAddressPrefix()
Get the sourceAddressPrefix property: The source address prefix.- Returns:
- the sourceAddressPrefix value.
-
withSourceAddressPrefix
public EffectiveNetworkSecurityRule withSourceAddressPrefix(String sourceAddressPrefix)
Set the sourceAddressPrefix property: The source address prefix.- Parameters:
sourceAddressPrefix- the sourceAddressPrefix value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
destinationAddressPrefix
public String destinationAddressPrefix()
Get the destinationAddressPrefix property: The destination address prefix.- Returns:
- the destinationAddressPrefix value.
-
withDestinationAddressPrefix
public EffectiveNetworkSecurityRule withDestinationAddressPrefix(String destinationAddressPrefix)
Set the destinationAddressPrefix property: The destination address prefix.- Parameters:
destinationAddressPrefix- the destinationAddressPrefix value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
sourceAddressPrefixes
public List<String> 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
public EffectiveNetworkSecurityRule withSourceAddressPrefixes(List<String> sourceAddressPrefixes)
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
public List<String> 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
public List<String> 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
public List<String> 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
public SecurityRuleAccess access()
Get the access property: Whether network traffic is allowed or denied.- Returns:
- the access value.
-
withAccess
public EffectiveNetworkSecurityRule withAccess(SecurityRuleAccess access)
Set the access property: Whether network traffic is allowed or denied.- Parameters:
access- the access value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
priority
public Integer priority()
Get the priority property: The priority of the rule.- Returns:
- the priority value.
-
withPriority
public EffectiveNetworkSecurityRule withPriority(Integer priority)
Set the priority property: The priority of the rule.- Parameters:
priority- the priority value to set.- Returns:
- the EffectiveNetworkSecurityRule object itself.
-
direction
public SecurityRuleDirection direction()
Get the direction property: The direction of the rule.- Returns:
- the direction value.
-
withDirection
public EffectiveNetworkSecurityRule withDirection(SecurityRuleDirection direction)
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.
-
-