All Products
Search
Document Center

Smart Access Gateway:CreateSmartAccessGatewayClientUser

Last Updated:Aug 28, 2026

Creates a client account for an SAG app instance.

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

smartag:CreateSmartAccessGatewayClientUser

*SmartAccessGateway

acs:smartag:{#regionId}:{#accountId}:smartag/{#SmartAGId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the SAG app instance.

cn-shanghai

SmartAGId

string

Yes

The ID of the SAG app instance.

sag-gnhe6sywtare5****

UserName

string

No

The username, which must be unique within the SAG app instance.

The username must be 7 to 33 characters long and can contain letters, digits, underscores (_), at signs (@), periods (.), and hyphens (-). It must start with a letter or digit.

Note

If you specify a username, you must also specify a password, and vice versa.

doctest

ClientIp

string

No

  • If the client app service is enabled, specify a static IP address for the client account to connect to Alibaba Cloud.

Note

The IP address must fall within a private CIDR block.

  • If the client app service is disabled, a different IP address from a private CIDR block is assigned for each connection.

10.0.XX.XX

UserMail

string

Yes

The email address of the client account. Credentials are sent to this address.

username@example.com

Bandwidth

integer

Yes

The maximum bandwidth. Unit: Kbit/s. Valid values: 1 to 20000. Default value: 2000.

20

Password

string

No

The password for signing in to the SAG app.

The password must be 8 to 32 characters long and can contain letters, digits, underscores (_), at signs (@), and hyphens (-). It must start with a letter or digit.

duuf****

Response elements

Element

Type

Description

Example

object

UserName

string

The username.

doc

RequestId

string

The request ID.

72E82F5E-66E8-4C22-BF1F-5CEB7DC132E7

UserMail

string

The email address of the client account.

username@example.com

Bandwidth

integer

The maximum bandwidth. Unit: Kbit/s.

20

ClientIp

string

The IP address of the client app.

10.0.XX.XX

Examples

Success response

JSON format

{
  "UserName": "doc",
  "RequestId": "72E82F5E-66E8-4C22-BF1F-5CEB7DC132E7",
  "UserMail": "username@example.com",
  "Bandwidth": 20,
  "ClientIp": "10.0.XX.XX"
}

Error codes

HTTP status code

Error code

Error message

Description

400 ClientUser.BandwidthInvalid The specified Bandwidth is invalid. The specified bandwidth is invalid.
400 ClientUser.EmailEmpty You must specify UserEmail. You must specify the email address.
400 ClientUser.EmailInvalid The format of the specified UserEmail is invalid. The format of the email address is invalid.
400 ClientUser.InvalidClientIp The specified ClientIp is invalid. The specified ClientIp is invalid.
400 ClientUser.IpEmpty You must specify ClientIp. You must specify the static IP address.
400 ClientUser.IpInvalid The specified ClientIp is invalid. The specified static IP address is invalid.
400 ClientUser.NameEmpty You must specify UserName. You must enter a username.
400 ClientUser.NameInvalid The specified UserName is invalid. The format of the username is invalid.
400 ClientUser.UserExist The specified user already exists. The specified user already exists.
400 ClientUser.UserOverLimit The maximum number of users is exceeded. The maximum number of users is exceeded.
400 SAG.CidrEmpty You must specify the CIDR blocks of SAG. You must specify the CIDR blocks of SAG.
400 ClientUser.PasswordInvalid The specified password format is invalid. The specified password format is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.