EffectiveNetworkSecurityRule Class

  • java.lang.Object
    • com.azure.resourcemanager.network.models.EffectiveNetworkSecurityRule

Implements

public final class EffectiveNetworkSecurityRule
implements JsonSerializable<EffectiveNetworkSecurityRule>

Effective network security rules.

Constructor Summary

Constructor Description
EffectiveNetworkSecurityRule()

Creates an instance of EffectiveNetworkSecurityRule class.

Method Summary

Modifier and Type Method and Description
SecurityRuleAccess access()

Get the access property: Whether network traffic is allowed or denied.

String destinationAddressPrefix()

Get the destinationAddressPrefix property: The destination address prefix.

List<String> destinationAddressPrefixes()

Get the destinationAddressPrefixes property: The destination address prefixes.

String destinationPortRange()

Get the destinationPortRange property: The destination port or range.

List<String> destinationPortRanges()

Get the destinationPortRanges property: The destination port ranges.

SecurityRuleDirection direction()

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.

static EffectiveNetworkSecurityRule fromJson(JsonReader jsonReader)

Reads an instance of EffectiveNetworkSecurityRule from the JsonReader.

String name()

Get the name property: The name of the security rule specified by the user (if created by the user).

Integer priority()

Get the priority property: The priority of the rule.

EffectiveSecurityRuleProtocol protocol()

Get the protocol property: The network protocol this rule applies to.

String sourceAddressPrefix()

Get the sourceAddressPrefix property: The source address prefix.

List<String> sourceAddressPrefixes()

Get the sourceAddressPrefixes property: The source address prefixes.

String sourcePortRange()

Get the sourcePortRange property: The source port or range.

List<String> sourcePortRanges()

Get the sourcePortRanges property: The source port ranges.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

EffectiveNetworkSecurityRule withAccess(SecurityRuleAccess access)

Set the access property: Whether network traffic is allowed or denied.

EffectiveNetworkSecurityRule withDestinationAddressPrefix(String destinationAddressPrefix)

Set the destinationAddressPrefix property: The destination address prefix.

EffectiveNetworkSecurityRule withDestinationAddressPrefixes(List<String> destinationAddressPrefixes)

Set the destinationAddressPrefixes property: The destination address prefixes.

EffectiveNetworkSecurityRule withDestinationPortRange(String destinationPortRange)

Set the destinationPortRange property: The destination port or range.

EffectiveNetworkSecurityRule withDestinationPortRanges(List<String> destinationPortRanges)

Set the destinationPortRanges property: The destination port ranges.

EffectiveNetworkSecurityRule withDirection(SecurityRuleDirection direction)

Set the direction property: The direction of the rule.

EffectiveNetworkSecurityRule withExpandedDestinationAddressPrefix(List<String> expandedDestinationAddressPrefix)

Set the expandedDestinationAddressPrefix property: Expanded destination address prefix.

EffectiveNetworkSecurityRule withExpandedSourceAddressPrefix(List<String> expandedSourceAddressPrefix)

Set the expandedSourceAddressPrefix property: The expanded source address prefix.

EffectiveNetworkSecurityRule withName(String name)

Set the name property: The name of the security rule specified by the user (if created by the user).

EffectiveNetworkSecurityRule withPriority(Integer priority)

Set the priority property: The priority of the rule.

EffectiveNetworkSecurityRule withProtocol(EffectiveSecurityRuleProtocol protocol)

Set the protocol property: The network protocol this rule applies to.

EffectiveNetworkSecurityRule withSourceAddressPrefix(String sourceAddressPrefix)

Set the sourceAddressPrefix property: The source address prefix.

EffectiveNetworkSecurityRule withSourceAddressPrefixes(List<String> sourceAddressPrefixes)

Set the sourceAddressPrefixes property: The source address prefixes.

EffectiveNetworkSecurityRule withSourcePortRange(String sourcePortRange)

Set the sourcePortRange property: The source port or range.

EffectiveNetworkSecurityRule withSourcePortRanges(List<String> sourcePortRanges)

Set the sourcePortRanges property: The source port ranges.

Methods inherited from java.lang.Object

Constructor Details

EffectiveNetworkSecurityRule

public EffectiveNetworkSecurityRule()

Creates an instance of EffectiveNetworkSecurityRule class.

Method Details

access

public SecurityRuleAccess access()

Get the access property: Whether network traffic is allowed or denied.

Returns:

the access value.

destinationAddressPrefix

public String destinationAddressPrefix()

Get the destinationAddressPrefix property: The destination address prefix.

Returns:

the destinationAddressPrefix value.

destinationAddressPrefixes

public List 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.

destinationPortRange

public String destinationPortRange()

Get the destinationPortRange property: The destination port or range.

Returns:

the destinationPortRange value.

destinationPortRanges

public List 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.

direction

public SecurityRuleDirection direction()

Get the direction property: The direction of the rule.

Returns:

the direction value.

expandedDestinationAddressPrefix

public List expandedDestinationAddressPrefix()

Get the expandedDestinationAddressPrefix property: Expanded destination address prefix.

Returns:

the expandedDestinationAddressPrefix value.

expandedSourceAddressPrefix

public List expandedSourceAddressPrefix()

Get the expandedSourceAddressPrefix property: The expanded source address prefix.

Returns:

the expandedSourceAddressPrefix value.

fromJson

public static EffectiveNetworkSecurityRule fromJson(JsonReader jsonReader)

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.

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.

priority

public Integer priority()

Get the priority property: The priority of the rule.

Returns:

the priority value.

protocol

public EffectiveSecurityRuleProtocol protocol()

Get the protocol property: The network protocol this rule applies to.

Returns:

the protocol value.

sourceAddressPrefix

public String sourceAddressPrefix()

Get the sourceAddressPrefix property: The source address prefix.

Returns:

the sourceAddressPrefix value.

sourceAddressPrefixes

public List 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.

sourcePortRange

public String sourcePortRange()

Get the sourcePortRange property: The source port or range.

Returns:

the sourcePortRange value.

sourcePortRanges

public List 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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

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.

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.

withDestinationAddressPrefixes

public EffectiveNetworkSecurityRule withDestinationAddressPrefixes(List 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.

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.

withDestinationPortRanges

public EffectiveNetworkSecurityRule withDestinationPortRanges(List 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.

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.

withExpandedDestinationAddressPrefix

public EffectiveNetworkSecurityRule withExpandedDestinationAddressPrefix(List expandedDestinationAddressPrefix)

Set the expandedDestinationAddressPrefix property: Expanded destination address prefix.

Parameters:

expandedDestinationAddressPrefix - the expandedDestinationAddressPrefix value to set.

Returns:

the EffectiveNetworkSecurityRule object itself.

withExpandedSourceAddressPrefix

public EffectiveNetworkSecurityRule withExpandedSourceAddressPrefix(List expandedSourceAddressPrefix)

Set the expandedSourceAddressPrefix property: The expanded source address prefix.

Parameters:

expandedSourceAddressPrefix - the expandedSourceAddressPrefix value to set.

Returns:

the EffectiveNetworkSecurityRule object itself.

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.

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.

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.

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.

withSourceAddressPrefixes

public EffectiveNetworkSecurityRule withSourceAddressPrefixes(List 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.

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.

withSourcePortRanges

public EffectiveNetworkSecurityRule withSourcePortRanges(List 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.

Applies to