你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

NetworkSecurityRule Interface

Implements

public interface NetworkSecurityRule
extends HasInnerModel<SecurityRuleInner>, ChildResource<NetworkSecurityGroup>

A network security rule in a network security group.

Method Summary

Modifier and Type Method and Description
abstract SecurityRuleAccess access()

Gets the type of access the rule enforces.

abstract String description()

Gets the user-defined description of the security rule.

abstract String destinationAddressPrefix()

Gets the destination address prefix the rule applies to.

abstract List<String> destinationAddressPrefixes()

Gets the list of destination address prefixes the rule applies to.

abstract Set<String> destinationApplicationSecurityGroupIds()

Gets list of application security group ids specified as destination.

abstract String destinationPortRange()

Gets the destination port range that the rule applies to.

abstract List<String> destinationPortRanges()

Gets the destination port ranges that the rule applies to.

abstract SecurityRuleDirection direction()

Gets the direction of the network traffic that the network security rule applies to.

abstract int priority()

Gets the priority number of this rule based on which this rule will be applied relative to the priority numbers of any other rules specified for this network security group.

abstract SecurityRuleProtocol protocol()

Gets the network protocol the rule applies to.

abstract String sourceAddressPrefix()

Gets the source address prefix the rule applies to.

abstract List<String> sourceAddressPrefixes()

Gets the list of source address prefixes the rule applies to.

abstract Set<String> sourceApplicationSecurityGroupIds()

Gets list of application security group ids specified as source.

abstract String sourcePortRange()

Gets the source port range that the rule applies to.

abstract List<String> sourcePortRanges()

Gets the source port ranges that the rule applies to.

Method Details

access

public abstract SecurityRuleAccess access()

Gets the type of access the rule enforces.

Returns:

the type of access the rule enforces

description

public abstract String description()

Gets the user-defined description of the security rule.

Returns:

the user-defined description of the security rule

destinationAddressPrefix

public abstract String destinationAddressPrefix()

Gets the destination address prefix the rule applies to.

Returns:

the destination address prefix the rule applies to, expressed using the CIDR notation in the format: "###.###.###.###/##", and "*" means "any"

destinationAddressPrefixes

public abstract List destinationAddressPrefixes()

Gets the list of destination address prefixes the rule applies to.

Returns:

the list of destination address prefixes the rule applies to, expressed using the CIDR notation in the format: "###.###.###.###/##", and "*" means "any", or IP addresses

destinationApplicationSecurityGroupIds

public abstract Set destinationApplicationSecurityGroupIds()

Gets list of application security group ids specified as destination.

Returns:

list of application security group ids specified as destination

destinationPortRange

public abstract String destinationPortRange()

Gets the destination port range that the rule applies to.

Returns:

the destination port range that the rule applies to, in the format "##-##", where "*" means any

destinationPortRanges

public abstract List destinationPortRanges()

Gets the destination port ranges that the rule applies to.

Returns:

the destination port ranges that the rule applies to, in the format "##-##", where "*" means any

direction

public abstract SecurityRuleDirection direction()

Gets the direction of the network traffic that the network security rule applies to.

Returns:

the direction of the network traffic that the network security rule applies to.

priority

public abstract int priority()

Gets the priority number of this rule based on which this rule will be applied relative to the priority numbers of any other rules specified for this network security group.

Returns:

the priority number of this rule based on which this rule will be applied relative to the priority numbers of any other rules specified for this network security group

protocol

public abstract SecurityRuleProtocol protocol()

Gets the network protocol the rule applies to.

Returns:

the network protocol the rule applies to

sourceAddressPrefix

public abstract String sourceAddressPrefix()

Gets the source address prefix the rule applies to.

Returns:

the source address prefix the rule applies to, expressed using the CIDR notation in the format: "###.###.###.###/##", and "*" means "any"

sourceAddressPrefixes

public abstract List sourceAddressPrefixes()

Gets the list of source address prefixes the rule applies to.

Returns:

the list of source address prefixes the rule applies to, expressed using the CIDR notation in the format: "###.###.###.###/##", and "*" means "any", or IP addresses

sourceApplicationSecurityGroupIds

public abstract Set sourceApplicationSecurityGroupIds()

Gets list of application security group ids specified as source.

Returns:

list of application security group ids specified as source

sourcePortRange

public abstract String sourcePortRange()

Gets the source port range that the rule applies to.

Returns:

the source port range that the rule applies to, in the format "##-##", where "*" means "any"

sourcePortRanges

public abstract List sourcePortRanges()

Gets the source port ranges that the rule applies to.

Returns:

the source port ranges that the rule applies to, in the format "##-##", where "*" means "any"

Applies to