Rule Class

  • java.lang.Object
    • com.azure.resourcemanager.security.models.Rule

public final class Rule

Describes remote addresses that is recommended to communicate with the Azure resource on some (Protocol, Port, Direction). All other remote addresses are recommended to be blocked.

Constructor Summary

Constructor Description
Rule()

Creates an instance of Rule class.

Method Summary

Modifier and Type Method and Description
Integer destinationPort()

Get the destinationPort property: The rule's destination port.

Direction direction()

Get the direction property: The rule's direction.

List<String> ipAddresses()

Get the ipAddresses property: The remote IP addresses that should be able to communicate with the Azure resource on the rule's destination port and protocol.

String name()

Get the name property: The name of the rule.

List<TransportProtocol> protocols()

Get the protocols property: The rule's transport protocols.

void validate()

Validates the instance.

Rule withDestinationPort(Integer destinationPort)

Set the destinationPort property: The rule's destination port.

Rule withDirection(Direction direction)

Set the direction property: The rule's direction.

Rule withIpAddresses(List<String> ipAddresses)

Set the ipAddresses property: The remote IP addresses that should be able to communicate with the Azure resource on the rule's destination port and protocol.

Rule withName(String name)

Set the name property: The name of the rule.

Rule withProtocols(List<TransportProtocol> protocols)

Set the protocols property: The rule's transport protocols.

Methods inherited from java.lang.Object

Constructor Details

Rule

public Rule()

Creates an instance of Rule class.

Method Details

destinationPort

public Integer destinationPort()

Get the destinationPort property: The rule's destination port.

Returns:

the destinationPort value.

direction

public Direction direction()

Get the direction property: The rule's direction.

Returns:

the direction value.

ipAddresses

public List ipAddresses()

Get the ipAddresses property: The remote IP addresses that should be able to communicate with the Azure resource on the rule's destination port and protocol.

Returns:

the ipAddresses value.

name

public String name()

Get the name property: The name of the rule.

Returns:

the name value.

protocols

public List protocols()

Get the protocols property: The rule's transport protocols.

Returns:

the protocols value.

validate

public void validate()

Validates the instance.

withDestinationPort

public Rule withDestinationPort(Integer destinationPort)

Set the destinationPort property: The rule's destination port.

Parameters:

destinationPort - the destinationPort value to set.

Returns:

the Rule object itself.

withDirection

public Rule withDirection(Direction direction)

Set the direction property: The rule's direction.

Parameters:

direction - the direction value to set.

Returns:

the Rule object itself.

withIpAddresses

public Rule withIpAddresses(List ipAddresses)

Set the ipAddresses property: The remote IP addresses that should be able to communicate with the Azure resource on the rule's destination port and protocol.

Parameters:

ipAddresses - the ipAddresses value to set.

Returns:

the Rule object itself.

withName

public Rule withName(String name)

Set the name property: The name of the rule.

Parameters:

name - the name value to set.

Returns:

the Rule object itself.

withProtocols

public Rule withProtocols(List protocols)

Set the protocols property: The rule's transport protocols.

Parameters:

protocols - the protocols value to set.

Returns:

the Rule object itself.

Applies to