Creates a client account for an SAG app instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
smartag:CreateSmartAccessGatewayClientUser |
*SmartAccessGateway
|
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 |
Note
The IP address must fall within a private CIDR block.
|
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.