Rule Class
- java.
lang. Object - com.
azure. resourcemanager. security. models. Rule
- com.
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 destination |
Direction |
direction()
Get the direction property: The rule's direction. |
List<String> |
ipAddresses()
Get the ip |
String |
name()
Get the name property: The name of the rule. |
List<Transport |
protocols()
Get the protocols property: The rule's transport protocols. |
void |
validate()
Validates the instance. |
Rule |
withDestinationPort(Integer destinationPort)
Set the destination |
Rule |
withDirection(Direction direction)
Set the direction property: The rule's direction. |
Rule |
withIpAddresses(List<String> ipAddresses)
Set the ip |
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:
direction
public Direction direction()
Get the direction property: The rule's direction.
Returns:
ipAddresses
public List
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:
name
public String name()
Get the name property: The name of the rule.
Returns:
protocols
public List
Get the protocols property: The rule's transport protocols.
Returns:
validate
public void validate()
Validates the instance.
withDestinationPort
public Rule withDestinationPort(Integer destinationPort)
Set the destinationPort property: The rule's destination port.
Parameters:
Returns:
withDirection
public Rule withDirection(Direction direction)
Set the direction property: The rule's direction.
Parameters:
Returns:
withIpAddresses
public Rule withIpAddresses(List
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:
Returns:
withName
public Rule withName(String name)
Set the name property: The name of the rule.
Parameters:
Returns:
withProtocols
public Rule withProtocols(List
Set the protocols property: The rule's transport protocols.
Parameters:
Returns:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for