All Products
Search
Document Center

File Storage NAS:ModifyAccessRule

Last Updated:Aug 13, 2026

Modifies a permission rule in a permission group.

Operation description

Rules in the default permission group (DEFAULT_VPC_GROUP_NAME) cannot be modified.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

nas:ModifyAccessRule

update

*AccessGroup

acs:nas:{#regionId}:{#accountId}:accessgroup/{#accessgroupName}

None None

Request parameters

Parameter

Type

Required

Description

Example

AccessGroupName

string

Yes

The name of the permission group.

vpc-test

AccessRuleId

string

Yes

The ID of the permission rule.

1

SourceCidrIp

string

No

The IP address or CIDR block.

The value must be a single IP address or a CIDR block.

Note

You must specify either SourceCidrIp or Ipv6SourceCidrIp. You cannot leave both parameters empty, and you cannot specify both parameters at the same time.

192.0.**.**

RWAccessType

string

No

The read and write permissions of the authorized object on the file system.

Valid values:

  • RDWR (default): read and write.

  • RDONLY: read-only.

Valid values:

  • RDWR :

    Read and write.

  • RDONLY :

    Read-only.

RDWR

UserAccessType

string

No

The authorization of the system user of the authorized object on the file system.

Valid values:

  • no_squash: allows access to the file system as the root user.

  • root_squash: maps the root user to the nobody user when the root user accesses the file system.

  • all_squash: maps all users to the nobody user regardless of the user identity used to access the file system.

The nobody user is a default user in Linux. This user can access only public content on the server and has low privileges and high security.

Valid values:

  • all_squash :

    Maps all users to the nobody user regardless of the user identity used to access the file system.

  • no_squash :

    Allows access to the file system as the root user.

  • root_squash :

    Maps the root user to the nobody user when the root user accesses the file system.

all_squash

Priority

integer

No

The priority of the permission rule.

Valid values: 1 to 100.

Default value: 1 (highest priority).

1

FileSystemType

string

No

The type of the file system.

Valid values:

  • standard (default): General-purpose NAS.

  • extreme: Extreme NAS.

Valid values:

  • standard :

    General-purpose NAS.

  • extreme :

    Extreme NAS.

standard

Ipv6SourceCidrIp

string

No

The source IPv6 CIDR block.

IPv6 addresses and CIDR blocks are supported.

Note
  • Only Extreme NAS file systems in the China (Hohhot) region support IPv6 CIDR blocks.

  • Only VPCs are supported.

  • IPv4 and IPv6 are mutually exclusive. You cannot convert between the two types.

  • You must specify either SourceCidrIp or Ipv6SourceCidrIp. You cannot leave both parameters empty, and you cannot specify both parameters at the same time.

fe80::3d4a:80fd:f05d:****

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

6299428C-3861-435D-AE54-9B330A00****

Examples

Success response

JSON format

{
  "RequestId": "6299428C-3861-435D-AE54-9B330A00****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParam.Ipv6SourceCidrIp IPv6 address verification failed. IPv6 address verification failed.
400 InvalidParam.SourceCidrIp IPv4 address verification failed. IPv4 address verification failed.
400 InvalidParam.IPv4AndIPv6MutuallyExclusive You cannot configure IPv4 and IPv6 at the same time. You cannot configure IPv4 and IPv6 at the same time.
400 InvalidAccessGroup.NotsupportedIPv6 The access group does not support IPv6. The access group does not support IPv6.
400 InvalidParam.IPAddressIsBlank The IP address cannot be empty. The IP address cannot be empty.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.