Creates a client account.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
smartag:CreateSmartAccessGatewayClientUser | Write |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the Smart Access Gateway (SAG) app instance. | cn-shanghai |
SmartAGId | string | Yes | The ID of the SAG app instance. | sag-gnhe6sywtare5**** |
UserName | string | No | The username of the client account. The usernames of client accounts added to the same SAG app instance must be unique. The username must be 7 to 33 characters in length, and can contain letters, digits, underscores (_), at signs (@), periods (.), and hyphens (-). It must start with a letter or a digit. Note
For a client account, if you specify the username, you must also specify the password. If you specify the password, you must specify the username.
| 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. The username and password are sent to the specified email address by the administrator. | username@example.com |
Bandwidth | long | Yes | The maximum bandwidth value. Unit: Kbit/s. Valid values: 1 to 20000. Default value: 2000. | 20 |
Password | string | No | The password that is used to log on to the SAG app. The password must be 8 to 32 characters in length. It can contain letters, digits, underscores (_), at signs (@), and hyphens (-). It must start with a letter or a digit. | duuf**** |
Response parameters
Examples
Sample success responses
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. |
For a list of error codes, visit the Service error codes.