SecurityRulePropertiesFormat Class

  • java.lang.Object
    • com.azure.resourcemanager.network.fluent.models.SecurityRulePropertiesFormat

Implements

public final class SecurityRulePropertiesFormat
implements JsonSerializable<SecurityRulePropertiesFormat>

Security rule resource.

Constructor Summary

Constructor Description
SecurityRulePropertiesFormat()

Creates an instance of SecurityRulePropertiesFormat class.

Method Summary

Modifier and Type Method and Description
SecurityRuleAccess access()

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

String description()

Get the description property: A description for this rule.

String destinationAddressPrefix()

Get the destinationAddressPrefix property: The destination address prefix.

List<String> destinationAddressPrefixes()

Get the destinationAddressPrefixes property: The destination address prefixes.

List<ApplicationSecurityGroupInner> destinationApplicationSecurityGroups()

Get the destinationApplicationSecurityGroups property: The application security group specified as destination.

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.

static SecurityRulePropertiesFormat fromJson(JsonReader jsonReader)

Reads an instance of SecurityRulePropertiesFormat from the JsonReader.

int priority()

Get the priority property: The priority of the rule.

SecurityRuleProtocol protocol()

Get the protocol property: Network protocol this rule applies to.

ProvisioningState provisioningState()

Get the provisioningState property: The provisioning state of the security rule resource.

String sourceAddressPrefix()

Get the sourceAddressPrefix property: The CIDR or source IP range.

List<String> sourceAddressPrefixes()

Get the sourceAddressPrefixes property: The CIDR or source IP ranges.

List<ApplicationSecurityGroupInner> sourceApplicationSecurityGroups()

Get the sourceApplicationSecurityGroups property: The application security group specified as source.

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.

SecurityRulePropertiesFormat withAccess(SecurityRuleAccess access)

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

SecurityRulePropertiesFormat withDescription(String description)

Set the description property: A description for this rule.

SecurityRulePropertiesFormat withDestinationAddressPrefix(String destinationAddressPrefix)

Set the destinationAddressPrefix property: The destination address prefix.

SecurityRulePropertiesFormat withDestinationAddressPrefixes(List<String> destinationAddressPrefixes)

Set the destinationAddressPrefixes property: The destination address prefixes.

SecurityRulePropertiesFormat withDestinationApplicationSecurityGroups(List<ApplicationSecurityGroupInner> destinationApplicationSecurityGroups)

Set the destinationApplicationSecurityGroups property: The application security group specified as destination.

SecurityRulePropertiesFormat withDestinationPortRange(String destinationPortRange)

Set the destinationPortRange property: The destination port or range.

SecurityRulePropertiesFormat withDestinationPortRanges(List<String> destinationPortRanges)

Set the destinationPortRanges property: The destination port ranges.

SecurityRulePropertiesFormat withDirection(SecurityRuleDirection direction)

Set the direction property: The direction of the rule.

SecurityRulePropertiesFormat withPriority(int priority)

Set the priority property: The priority of the rule.

SecurityRulePropertiesFormat withProtocol(SecurityRuleProtocol protocol)

Set the protocol property: Network protocol this rule applies to.

SecurityRulePropertiesFormat withSourceAddressPrefix(String sourceAddressPrefix)

Set the sourceAddressPrefix property: The CIDR or source IP range.

SecurityRulePropertiesFormat withSourceAddressPrefixes(List<String> sourceAddressPrefixes)

Set the sourceAddressPrefixes property: The CIDR or source IP ranges.

SecurityRulePropertiesFormat withSourceApplicationSecurityGroups(List<ApplicationSecurityGroupInner> sourceApplicationSecurityGroups)

Set the sourceApplicationSecurityGroups property: The application security group specified as source.

SecurityRulePropertiesFormat withSourcePortRange(String sourcePortRange)

Set the sourcePortRange property: The source port or range.

SecurityRulePropertiesFormat withSourcePortRanges(List<String> sourcePortRanges)

Set the sourcePortRanges property: The source port ranges.

Methods inherited from java.lang.Object

Constructor Details

SecurityRulePropertiesFormat

public SecurityRulePropertiesFormat()

Creates an instance of SecurityRulePropertiesFormat class.

Method Details

access

public SecurityRuleAccess access()

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

Returns:

the access value.

description

public String description()

Get the description property: A description for this rule. Restricted to 140 chars.

Returns:

the description value.

destinationAddressPrefix

public String destinationAddressPrefix()

Get the destinationAddressPrefix property: The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.

Returns:

the destinationAddressPrefix value.

destinationAddressPrefixes

public List<String> destinationAddressPrefixes()

Get the destinationAddressPrefixes property: The destination address prefixes. CIDR or destination IP ranges.

Returns:

the destinationAddressPrefixes value.

destinationApplicationSecurityGroups

public List<ApplicationSecurityGroupInner> destinationApplicationSecurityGroups()

Get the destinationApplicationSecurityGroups property: The application security group specified as destination.

Returns:

the destinationApplicationSecurityGroups value.

destinationPortRange

public String destinationPortRange()

Get the destinationPortRange property: The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

Returns:

the destinationPortRange value.

destinationPortRanges

public List<String> destinationPortRanges()

Get the destinationPortRanges property: The destination port ranges.

Returns:

the destinationPortRanges value.

direction

public SecurityRuleDirection direction()

Get the direction property: The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic.

Returns:

the direction value.

fromJson

public static SecurityRulePropertiesFormat fromJson(JsonReader jsonReader)

Reads an instance of SecurityRulePropertiesFormat from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of SecurityRulePropertiesFormat if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

priority

public int priority()

Get the priority property: The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

Returns:

the priority value.

protocol

public SecurityRuleProtocol protocol()

Get the protocol property: Network protocol this rule applies to.

Returns:

the protocol value.

provisioningState

public ProvisioningState provisioningState()

Get the provisioningState property: The provisioning state of the security rule resource.

Returns:

the provisioningState value.

sourceAddressPrefix

public String sourceAddressPrefix()

Get the sourceAddressPrefix property: The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.

Returns:

the sourceAddressPrefix value.

sourceAddressPrefixes

public List<String> sourceAddressPrefixes()

Get the sourceAddressPrefixes property: The CIDR or source IP ranges.

Returns:

the sourceAddressPrefixes value.

sourceApplicationSecurityGroups

public List<ApplicationSecurityGroupInner> sourceApplicationSecurityGroups()

Get the sourceApplicationSecurityGroups property: The application security group specified as source.

Returns:

the sourceApplicationSecurityGroups value.

sourcePortRange

public String sourcePortRange()

Get the sourcePortRange property: The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

Returns:

the sourcePortRange value.

sourcePortRanges

public List<String> sourcePortRanges()

Get the sourcePortRanges property: The source port ranges.

Returns:

the sourcePortRanges value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAccess

public SecurityRulePropertiesFormat withAccess(SecurityRuleAccess access)

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

Parameters:

access - the access value to set.

Returns:

the SecurityRulePropertiesFormat object itself.

withDescription

public SecurityRulePropertiesFormat withDescription(String description)

Set the description property: A description for this rule. Restricted to 140 chars.

Parameters:

description - the description value to set.

Returns:

the SecurityRulePropertiesFormat object itself.

withDestinationAddressPrefix

public SecurityRulePropertiesFormat withDestinationAddressPrefix(String destinationAddressPrefix)

Set the destinationAddressPrefix property: The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.

Parameters:

destinationAddressPrefix - the destinationAddressPrefix value to set.

Returns:

the SecurityRulePropertiesFormat object itself.

withDestinationAddressPrefixes

public SecurityRulePropertiesFormat withDestinationAddressPrefixes(List<String> destinationAddressPrefixes)

Set the destinationAddressPrefixes property: The destination address prefixes. CIDR or destination IP ranges.

Parameters:

destinationAddressPrefixes - the destinationAddressPrefixes value to set.

Returns:

the SecurityRulePropertiesFormat object itself.

withDestinationApplicationSecurityGroups

public SecurityRulePropertiesFormat withDestinationApplicationSecurityGroups(List<ApplicationSecurityGroupInner> destinationApplicationSecurityGroups)

Set the destinationApplicationSecurityGroups property: The application security group specified as destination.

Parameters:

destinationApplicationSecurityGroups - the destinationApplicationSecurityGroups value to set.

Returns:

the SecurityRulePropertiesFormat object itself.

withDestinationPortRange

public SecurityRulePropertiesFormat withDestinationPortRange(String destinationPortRange)

Set the destinationPortRange property: The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

Parameters:

destinationPortRange - the destinationPortRange value to set.

Returns:

the SecurityRulePropertiesFormat object itself.

withDestinationPortRanges

public SecurityRulePropertiesFormat withDestinationPortRanges(List<String> destinationPortRanges)

Set the destinationPortRanges property: The destination port ranges.

Parameters:

destinationPortRanges - the destinationPortRanges value to set.

Returns:

the SecurityRulePropertiesFormat object itself.

withDirection

public SecurityRulePropertiesFormat withDirection(SecurityRuleDirection direction)

Set the direction property: The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic.

Parameters:

direction - the direction value to set.

Returns:

the SecurityRulePropertiesFormat object itself.

withPriority

public SecurityRulePropertiesFormat withPriority(int priority)

Set the priority property: The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

Parameters:

priority - the priority value to set.

Returns:

the SecurityRulePropertiesFormat object itself.

withProtocol

public SecurityRulePropertiesFormat withProtocol(SecurityRuleProtocol protocol)

Set the protocol property: Network protocol this rule applies to.

Parameters:

protocol - the protocol value to set.

Returns:

the SecurityRulePropertiesFormat object itself.

withSourceAddressPrefix

public SecurityRulePropertiesFormat withSourceAddressPrefix(String sourceAddressPrefix)

Set the sourceAddressPrefix property: The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.

Parameters:

sourceAddressPrefix - the sourceAddressPrefix value to set.

Returns:

the SecurityRulePropertiesFormat object itself.

withSourceAddressPrefixes

public SecurityRulePropertiesFormat withSourceAddressPrefixes(List<String> sourceAddressPrefixes)

Set the sourceAddressPrefixes property: The CIDR or source IP ranges.

Parameters:

sourceAddressPrefixes - the sourceAddressPrefixes value to set.

Returns:

the SecurityRulePropertiesFormat object itself.

withSourceApplicationSecurityGroups

public SecurityRulePropertiesFormat withSourceApplicationSecurityGroups(List<ApplicationSecurityGroupInner> sourceApplicationSecurityGroups)

Set the sourceApplicationSecurityGroups property: The application security group specified as source.

Parameters:

sourceApplicationSecurityGroups - the sourceApplicationSecurityGroups value to set.

Returns:

the SecurityRulePropertiesFormat object itself.

withSourcePortRange

public SecurityRulePropertiesFormat withSourcePortRange(String sourcePortRange)

Set the sourcePortRange property: The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

Parameters:

sourcePortRange - the sourcePortRange value to set.

Returns:

the SecurityRulePropertiesFormat object itself.

withSourcePortRanges

public SecurityRulePropertiesFormat withSourcePortRanges(List<String> sourcePortRanges)

Set the sourcePortRanges property: The source port ranges.

Parameters:

sourcePortRanges - the sourcePortRanges value to set.

Returns:

the SecurityRulePropertiesFormat object itself.

Applies to