SecurityRulePropertiesFormat Class
- java.
lang. Object - com.
azure. resourcemanager. network. fluent. models. SecurityRulePropertiesFormat
- com.
Implements
public final class SecurityRulePropertiesFormat
implements JsonSerializable<SecurityRulePropertiesFormat>
Security rule resource.
Constructor Summary
| Constructor | Description |
|---|---|
| SecurityRulePropertiesFormat() |
Creates an instance of Security |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Security |
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 destination |
| List<String> |
destinationAddressPrefixes()
Get the destination |
|
List<Application |
destinationApplicationSecurityGroups()
Get the destination |
| String |
destinationPortRange()
Get the destination |
| List<String> |
destinationPortRanges()
Get the destination |
|
Security |
direction()
Get the direction property: The direction of the rule. |
|
static
Security |
fromJson(JsonReader jsonReader)
Reads an instance of Security |
| int |
priority()
Get the priority property: The priority of the rule. |
|
Security |
protocol()
Get the protocol property: Network protocol this rule applies to. |
|
Provisioning |
provisioningState()
Get the provisioning |
| String |
sourceAddressPrefix()
Get the source |
| List<String> |
sourceAddressPrefixes()
Get the source |
|
List<Application |
sourceApplicationSecurityGroups()
Get the source |
| String |
sourcePortRange()
Get the source |
| List<String> |
sourcePortRanges()
Get the source |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Security |
withAccess(SecurityRuleAccess access)
Set the access property: The network traffic is allowed or denied. |
|
Security |
withDescription(String description)
Set the description property: A description for this rule. |
|
Security |
withDestinationAddressPrefix(String destinationAddressPrefix)
Set the destination |
|
Security |
withDestinationAddressPrefixes(List<String> destinationAddressPrefixes)
Set the destination |
|
Security |
withDestinationApplicationSecurityGroups(List<ApplicationSecurityGroupInner> destinationApplicationSecurityGroups)
Set the destination |
|
Security |
withDestinationPortRange(String destinationPortRange)
Set the destination |
|
Security |
withDestinationPortRanges(List<String> destinationPortRanges)
Set the destination |
|
Security |
withDirection(SecurityRuleDirection direction)
Set the direction property: The direction of the rule. |
|
Security |
withPriority(int priority)
Set the priority property: The priority of the rule. |
|
Security |
withProtocol(SecurityRuleProtocol protocol)
Set the protocol property: Network protocol this rule applies to. |
|
Security |
withSourceAddressPrefix(String sourceAddressPrefix)
Set the source |
|
Security |
withSourceAddressPrefixes(List<String> sourceAddressPrefixes)
Set the source |
|
Security |
withSourceApplicationSecurityGroups(List<ApplicationSecurityGroupInner> sourceApplicationSecurityGroups)
Set the source |
|
Security |
withSourcePortRange(String sourcePortRange)
Set the source |
|
Security |
withSourcePortRanges(List<String> sourcePortRanges)
Set the source |
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:
description
public String description()
Get the description property: A description for this rule. Restricted to 140 chars.
Returns:
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:
destinationAddressPrefixes
public List<String> destinationAddressPrefixes()
Get the destinationAddressPrefixes property: The destination address prefixes. CIDR or destination IP ranges.
Returns:
destinationApplicationSecurityGroups
public List<ApplicationSecurityGroupInner> destinationApplicationSecurityGroups()
Get the destinationApplicationSecurityGroups property: The application security group specified as destination.
Returns:
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:
destinationPortRanges
public List<String> destinationPortRanges()
Get the destinationPortRanges property: The destination port ranges.
Returns:
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:
fromJson
public static SecurityRulePropertiesFormat fromJson(JsonReader jsonReader)
Reads an instance of SecurityRulePropertiesFormat from the JsonReader.
Parameters:
Returns:
Throws:
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:
protocol
public SecurityRuleProtocol protocol()
Get the protocol property: Network protocol this rule applies to.
Returns:
provisioningState
public ProvisioningState provisioningState()
Get the provisioningState property: The provisioning state of the security rule resource.
Returns:
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:
sourceAddressPrefixes
public List<String> sourceAddressPrefixes()
Get the sourceAddressPrefixes property: The CIDR or source IP ranges.
Returns:
sourceApplicationSecurityGroups
public List<ApplicationSecurityGroupInner> sourceApplicationSecurityGroups()
Get the sourceApplicationSecurityGroups property: The application security group specified as source.
Returns:
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:
sourcePortRanges
public List<String> sourcePortRanges()
Get the sourcePortRanges property: The source port ranges.
Returns:
toJson
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:
Returns:
withDescription
public SecurityRulePropertiesFormat withDescription(String description)
Set the description property: A description for this rule. Restricted to 140 chars.
Parameters:
Returns:
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:
Returns:
withDestinationAddressPrefixes
public SecurityRulePropertiesFormat withDestinationAddressPrefixes(List<String> destinationAddressPrefixes)
Set the destinationAddressPrefixes property: The destination address prefixes. CIDR or destination IP ranges.
Parameters:
Returns:
withDestinationApplicationSecurityGroups
public SecurityRulePropertiesFormat withDestinationApplicationSecurityGroups(List<ApplicationSecurityGroupInner> destinationApplicationSecurityGroups)
Set the destinationApplicationSecurityGroups property: The application security group specified as destination.
Parameters:
Returns:
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:
Returns:
withDestinationPortRanges
public SecurityRulePropertiesFormat withDestinationPortRanges(List<String> destinationPortRanges)
Set the destinationPortRanges property: The destination port ranges.
Parameters:
Returns:
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:
Returns:
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:
Returns:
withProtocol
public SecurityRulePropertiesFormat withProtocol(SecurityRuleProtocol protocol)
Set the protocol property: Network protocol this rule applies to.
Parameters:
Returns:
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:
Returns:
withSourceAddressPrefixes
public SecurityRulePropertiesFormat withSourceAddressPrefixes(List<String> sourceAddressPrefixes)
Set the sourceAddressPrefixes property: The CIDR or source IP ranges.
Parameters:
Returns:
withSourceApplicationSecurityGroups
public SecurityRulePropertiesFormat withSourceApplicationSecurityGroups(List<ApplicationSecurityGroupInner> sourceApplicationSecurityGroups)
Set the sourceApplicationSecurityGroups property: The application security group specified as source.
Parameters:
Returns:
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:
Returns:
withSourcePortRanges
public SecurityRulePropertiesFormat withSourcePortRanges(List<String> sourcePortRanges)
Set the sourcePortRanges property: The source port ranges.
Parameters:
Returns: