Class JitNetworkAccessPortRule

java.lang.Object
com.azure.resourcemanager.security.models.JitNetworkAccessPortRule

public final class JitNetworkAccessPortRule extends Object
The JitNetworkAccessPortRule model.
  • Constructor Details

    • JitNetworkAccessPortRule

      public JitNetworkAccessPortRule()
  • Method Details

    • number

      public int number()
      Get the number property: The number property.
      Returns:
      the number value.
    • withNumber

      public JitNetworkAccessPortRule withNumber(int number)
      Set the number property: The number property.
      Parameters:
      number - the number value to set.
      Returns:
      the JitNetworkAccessPortRule object itself.
    • protocol

      public Protocol protocol()
      Get the protocol property: The protocol property.
      Returns:
      the protocol value.
    • withProtocol

      public JitNetworkAccessPortRule withProtocol(Protocol protocol)
      Set the protocol property: The protocol property.
      Parameters:
      protocol - the protocol value to set.
      Returns:
      the JitNetworkAccessPortRule object itself.
    • allowedSourceAddressPrefix

      public String allowedSourceAddressPrefix()
      Get the allowedSourceAddressPrefix property: Mutually exclusive with the "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, for example "192.168.0.3" or "192.168.0.0/16".
      Returns:
      the allowedSourceAddressPrefix value.
    • withAllowedSourceAddressPrefix

      public JitNetworkAccessPortRule withAllowedSourceAddressPrefix(String allowedSourceAddressPrefix)
      Set the allowedSourceAddressPrefix property: Mutually exclusive with the "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, for example "192.168.0.3" or "192.168.0.0/16".
      Parameters:
      allowedSourceAddressPrefix - the allowedSourceAddressPrefix value to set.
      Returns:
      the JitNetworkAccessPortRule object itself.
    • allowedSourceAddressPrefixes

      public List<String> allowedSourceAddressPrefixes()
      Get the allowedSourceAddressPrefixes property: Mutually exclusive with the "allowedSourceAddressPrefix" parameter.
      Returns:
      the allowedSourceAddressPrefixes value.
    • withAllowedSourceAddressPrefixes

      public JitNetworkAccessPortRule withAllowedSourceAddressPrefixes(List<String> allowedSourceAddressPrefixes)
      Set the allowedSourceAddressPrefixes property: Mutually exclusive with the "allowedSourceAddressPrefix" parameter.
      Parameters:
      allowedSourceAddressPrefixes - the allowedSourceAddressPrefixes value to set.
      Returns:
      the JitNetworkAccessPortRule object itself.
    • maxRequestAccessDuration

      public String maxRequestAccessDuration()
      Get the maxRequestAccessDuration property: Maximum duration requests can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 day.
      Returns:
      the maxRequestAccessDuration value.
    • withMaxRequestAccessDuration

      public JitNetworkAccessPortRule withMaxRequestAccessDuration(String maxRequestAccessDuration)
      Set the maxRequestAccessDuration property: Maximum duration requests can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 day.
      Parameters:
      maxRequestAccessDuration - the maxRequestAccessDuration value to set.
      Returns:
      the JitNetworkAccessPortRule object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.