NsgSecurityRule Class
- java.
lang. Object - com.
microsoft. azure. management. resourcemover. v2021_01_01.NsgSecurityRule
- com.
public class NsgSecurityRule
Security Rule data model for Network Security Groups.
Constructor Summary
| Constructor | Description | |
|---|---|---|
| NsgSecurityRule() | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| java.lang.String |
access()
Get gets or sets whether network traffic is allowed or denied. |
| java.lang.String |
description()
Get gets or sets a description for this rule. |
| java.lang.String |
destinationAddressPrefix()
Get gets or sets destination address prefix. |
| java.lang.String |
destinationPortRange()
Get gets or sets Destination Port or Range. |
| java.lang.String |
direction()
Get gets or sets the direction of the rule. |
| java.lang.String |
name()
Get gets or sets the Security rule name. |
| java.lang.Integer |
priority()
Get gets or sets the priority of the rule. |
| java.lang.String |
protocol()
Get gets or sets Network protocol this rule applies to. |
| java.lang.String |
sourceAddressPrefix()
Get gets or sets source address prefix. |
| java.lang.String |
sourcePortRange()
Get gets or sets Source Port or Range. |
|
Nsg |
withAccess(String access)
Set gets or sets whether network traffic is allowed or denied. |
|
Nsg |
withDescription(String description)
Set gets or sets a description for this rule. |
|
Nsg |
withDestinationAddressPrefix(String destinationAddressPrefix)
Set gets or sets destination address prefix. |
|
Nsg |
withDestinationPortRange(String destinationPortRange)
Set gets or sets Destination Port or Range. |
|
Nsg |
withDirection(String direction)
Set gets or sets the direction of the rule. |
|
Nsg |
withName(String name)
Set gets or sets the Security rule name. |
|
Nsg |
withPriority(Integer priority)
Set gets or sets the priority of the rule. |
|
Nsg |
withProtocol(String protocol)
Set gets or sets Network protocol this rule applies to. |
|
Nsg |
withSourceAddressPrefix(String sourceAddressPrefix)
Set gets or sets source address prefix. |
|
Nsg |
withSourcePortRange(String sourcePortRange)
Set gets or sets Source Port or Range. |
Methods inherited from java.lang.Object
Constructor Details
NsgSecurityRule
public NsgSecurityRule()
Method Details
access
public String access()
Get gets or sets whether network traffic is allowed or denied. Possible values are “Allow” and “Deny”.
Returns:
description
public String description()
Get gets or sets a description for this rule. Restricted to 140 chars.
Returns:
destinationAddressPrefix
public String destinationAddressPrefix()
Get gets or sets destination address prefix. CIDR or source IP range. A “*” can also be used to match all source IPs. Default tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used.
Returns:
destinationPortRange
public String destinationPortRange()
Get gets or sets Destination Port or Range. Integer or range between 0 and 65535. A “*” can also be used to match all ports.
Returns:
direction
public String direction()
Get gets or sets the direction of the rule.InBound or Outbound. The direction specifies if rule will be evaluated on incoming or outgoing traffic.
Returns:
name
public String name()
Get gets or sets the Security rule name.
Returns:
priority
public Integer priority()
Get gets or sets 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 String protocol()
Get gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*).
Returns:
sourceAddressPrefix
public String sourceAddressPrefix()
Get gets or sets source address prefix. CIDR or source IP range. A “*” 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:
sourcePortRange
public String sourcePortRange()
Get gets or sets Source Port or Range. Integer or range between 0 and 65535. A “*” can also be used to match all ports.
Returns:
withAccess
public NsgSecurityRule withAccess(String access)
Set gets or sets whether network traffic is allowed or denied. Possible values are “Allow” and “Deny”.
Parameters:
Returns:
withDescription
public NsgSecurityRule withDescription(String description)
Set gets or sets a description for this rule. Restricted to 140 chars.
Parameters:
Returns:
withDestinationAddressPrefix
public NsgSecurityRule withDestinationAddressPrefix(String destinationAddressPrefix)
Set gets or sets destination address prefix. CIDR or source IP range. A “*” can also be used to match all source IPs. Default tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used.
Parameters:
Returns:
withDestinationPortRange
public NsgSecurityRule withDestinationPortRange(String destinationPortRange)
Set gets or sets Destination Port or Range. Integer or range between 0 and 65535. A “*” can also be used to match all ports.
Parameters:
Returns:
withDirection
public NsgSecurityRule withDirection(String direction)
Set gets or sets the direction of the rule.InBound or Outbound. The direction specifies if rule will be evaluated on incoming or outgoing traffic.
Parameters:
Returns:
withName
public NsgSecurityRule withName(String name)
Set gets or sets the Security rule name.
Parameters:
Returns:
withPriority
public NsgSecurityRule withPriority(Integer priority)
Set gets or sets 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 NsgSecurityRule withProtocol(String protocol)
Set gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*).
Parameters:
Returns:
withSourceAddressPrefix
public NsgSecurityRule withSourceAddressPrefix(String sourceAddressPrefix)
Set gets or sets source address prefix. CIDR or source IP range. A “*” 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:
withSourcePortRange
public NsgSecurityRule withSourcePortRange(String sourcePortRange)
Set gets or sets Source Port or Range. Integer or range between 0 and 65535. A “*” can also be used to match all ports.
Parameters:
Returns: