Class Rule
java.lang.Object
com.azure.resourcemanager.security.models.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
-
Method Summary
Modifier and TypeMethodDescriptionGet the destinationPort property: The rule's destination port.Get the direction property: The rule's direction.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.name()
Get the name property: The name of the rule.Get the protocols property: The rule's transport protocols.void
validate()
Validates the instance.withDestinationPort
(Integer destinationPort) Set the destinationPort property: The rule's destination port.withDirection
(Direction direction) Set the direction property: The rule's direction.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.Set the name property: The name of the rule.withProtocols
(List<TransportProtocol> protocols) Set the protocols property: The rule's transport protocols.
-
Constructor Details
-
Rule
public Rule()
-
-
Method Details
-
name
Get the name property: The name of the rule.- Returns:
- the name value.
-
withName
Set the name property: The name of the rule.- Parameters:
name
- the name value to set.- Returns:
- the Rule object itself.
-
direction
Get the direction property: The rule's direction.- Returns:
- the direction value.
-
withDirection
Set the direction property: The rule's direction.- Parameters:
direction
- the direction value to set.- Returns:
- the Rule object itself.
-
destinationPort
Get the destinationPort property: The rule's destination port.- Returns:
- the destinationPort value.
-
withDestinationPort
Set the destinationPort property: The rule's destination port.- Parameters:
destinationPort
- the destinationPort value to set.- Returns:
- the Rule object itself.
-
protocols
Get the protocols property: The rule's transport protocols.- Returns:
- the protocols value.
-
withProtocols
Set the protocols property: The rule's transport protocols.- Parameters:
protocols
- the protocols value to set.- Returns:
- the Rule object itself.
-
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.
-
withIpAddresses
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.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-