Class NfsAccessRule

java.lang.Object
com.azure.resourcemanager.storagecache.models.NfsAccessRule

public final class NfsAccessRule extends Object
Rule to place restrictions on portions of the cache namespace being presented to clients.
  • Constructor Details

    • NfsAccessRule

      public NfsAccessRule()
  • Method Details

    • scope

      public NfsAccessRuleScope scope()
      Get the scope property: Scope for this rule. The scope and filter determine which clients match the rule.
      Returns:
      the scope value.
    • withScope

      public NfsAccessRule withScope(NfsAccessRuleScope scope)
      Set the scope property: Scope for this rule. The scope and filter determine which clients match the rule.
      Parameters:
      scope - the scope value to set.
      Returns:
      the NfsAccessRule object itself.
    • filter

      public String filter()
      Get the filter property: Filter applied to the scope for this rule. The filter's format depends on its scope. 'default' scope matches all clients and has no filter value. 'network' scope takes a filter in CIDR format (for example, 10.99.1.0/24). 'host' takes an IP address or fully qualified domain name as filter. If a client does not match any filter rule and there is no default rule, access is denied.
      Returns:
      the filter value.
    • withFilter

      public NfsAccessRule withFilter(String filter)
      Set the filter property: Filter applied to the scope for this rule. The filter's format depends on its scope. 'default' scope matches all clients and has no filter value. 'network' scope takes a filter in CIDR format (for example, 10.99.1.0/24). 'host' takes an IP address or fully qualified domain name as filter. If a client does not match any filter rule and there is no default rule, access is denied.
      Parameters:
      filter - the filter value to set.
      Returns:
      the NfsAccessRule object itself.
    • access

      public NfsAccessRuleAccess access()
      Get the access property: Access allowed by this rule.
      Returns:
      the access value.
    • withAccess

      public NfsAccessRule withAccess(NfsAccessRuleAccess access)
      Set the access property: Access allowed by this rule.
      Parameters:
      access - the access value to set.
      Returns:
      the NfsAccessRule object itself.
    • suid

      public Boolean suid()
      Get the suid property: Allow SUID semantics.
      Returns:
      the suid value.
    • withSuid

      public NfsAccessRule withSuid(Boolean suid)
      Set the suid property: Allow SUID semantics.
      Parameters:
      suid - the suid value to set.
      Returns:
      the NfsAccessRule object itself.
    • submountAccess

      public Boolean submountAccess()
      Get the submountAccess property: For the default policy, allow access to subdirectories under the root export. If this is set to no, clients can only mount the path '/'. If set to yes, clients can mount a deeper path, like '/a/b'.
      Returns:
      the submountAccess value.
    • withSubmountAccess

      public NfsAccessRule withSubmountAccess(Boolean submountAccess)
      Set the submountAccess property: For the default policy, allow access to subdirectories under the root export. If this is set to no, clients can only mount the path '/'. If set to yes, clients can mount a deeper path, like '/a/b'.
      Parameters:
      submountAccess - the submountAccess value to set.
      Returns:
      the NfsAccessRule object itself.
    • rootSquash

      public Boolean rootSquash()
      Get the rootSquash property: Map root accesses to anonymousUID and anonymousGID.
      Returns:
      the rootSquash value.
    • withRootSquash

      public NfsAccessRule withRootSquash(Boolean rootSquash)
      Set the rootSquash property: Map root accesses to anonymousUID and anonymousGID.
      Parameters:
      rootSquash - the rootSquash value to set.
      Returns:
      the NfsAccessRule object itself.
    • anonymousUid

      public String anonymousUid()
      Get the anonymousUid property: UID value that replaces 0 when rootSquash is true. 65534 will be used if not provided.
      Returns:
      the anonymousUid value.
    • withAnonymousUid

      public NfsAccessRule withAnonymousUid(String anonymousUid)
      Set the anonymousUid property: UID value that replaces 0 when rootSquash is true. 65534 will be used if not provided.
      Parameters:
      anonymousUid - the anonymousUid value to set.
      Returns:
      the NfsAccessRule object itself.
    • anonymousGid

      public String anonymousGid()
      Get the anonymousGid property: GID value that replaces 0 when rootSquash is true. This will use the value of anonymousUID if not provided.
      Returns:
      the anonymousGid value.
    • withAnonymousGid

      public NfsAccessRule withAnonymousGid(String anonymousGid)
      Set the anonymousGid property: GID value that replaces 0 when rootSquash is true. This will use the value of anonymousUID if not provided.
      Parameters:
      anonymousGid - the anonymousGid value to set.
      Returns:
      the NfsAccessRule object itself.
    • validate

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