调用CreateSmartAccessGatewayClientUser创建用户。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 否 | CreateSmartAccessGatewayClientUser |
要执行的操作。 取值:CreateSmartAccessGatewayClientUser。 |
Bandwidth | Long | 是 | 20 |
带宽,单位Kbps,最大2000Kbps。 |
RegionId | String | 是 | cn-shanghai |
智能接入网关APP实例所在地域。 |
SmartAGId | String | 是 | sag-gnhe6sywtare5****** |
智能接入网关APP实例ID。 |
UserMail | String | 是 | test@example.com |
普通用户的邮箱地址,用于管理员向普通用户发送登录APP的账号信息。 |
UserName | String | 否 | doctest |
用户名,同一个智能接入网关APP实例下的用户名不可以重复。 用户名和密码相互依赖,若指定用户名则必须指定密码,反之,若指定密码则必须指定用户名。 |
ClientIp | String | 否 | 10.**.**.** |
|
Password | String | 否 | duuf** |
登录智能接入网关APP的密码。 用户名和密码相互依赖,若指定用户名则必须指定密码,反之,若指定密码则必须指定用户名。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 72E82F5E-66E8-4C22-BF1F-5CEB7DC132E7 |
请求ID。 |
ClientIp | String | 10.**.*.** |
APP客户端的IP地址。 |
UserMail | String | test@example.com |
普通用户的邮箱地址。 |
UserName | String | doc |
用户名,同一个智能接入网关APP实例下的用户名不可以重复。 |
Bandwidth | Integer | 2 |
带宽。 |
示例
请求示例
http(s)://[Endpoint]/?Action=CreateSmartAccessGatewayClientUser
&Bandwidth=20
&RegionId=cn-shanghai
&SmartAGId=sag-gnhe6sywtare5******
&UserMail=test@example.com
&<公共请求参数>
正常返回示例
XML
格式
<CreateSmartAccessGatewayClientUserResponse>
<RequestId>72E82F5E-66E8-4C22-BF1F-5CEB7DC132E7</RequestId>
<UserMail>dd@example.com</UserMail>
<UserName>dd@example.com</UserName>
<Bandwidth>2</Bandwidth>
</CreateSmartAccessGatewayClientUserResponse>
JSON
格式
{
"RequestId": "72E82F5E-66E8-4C22-BF1F-5CEB7DC132E7",
"UserMail": "dd@example.com",
"UserName": "dd@example.com",
"Bandwidth": 2
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | ClientUser.BandwidthInvalid | The specified Bandwidth is invalid. | 用户带宽非法。 |
400 | ClientUser.EmailEmpty | You must specify UserEmail. | 用户邮箱不能为空。 |
400 | ClientUser.EmailInvalid | The format of the specified UserEmail is invalid. | 用户邮箱格式非法。 |
400 | ClientUser.InvalidClientIp | The specified ClientIp is invalid. | 非法的用户IP |
400 | ClientUser.IpEmpty | You must specify ClientIp. | 未指定静态IP。 |
400 | ClientUser.IpInvalid | The specified ClientIp is invalid. | 指定的静态IP非法。 |
400 | ClientUser.NameEmpty | You must specify UserName. | 用户名不能为空。 |
400 | ClientUser.NameInvalid | The specified UserName is invalid. | 用户名格式非法。 |
400 | ClientUser.UserExist | The specified user already exists. | 用户已经存在。 |
400 | ClientUser.UserOverLimit | The maximum number of users is exceeded. | 用户数已超限 |
400 | SAG.CidrEmpty | You must specify the CIDR blocks of SAG. | 智能网关地址段为空。 |
400 | ClientUser.PasswordInvalid | The specified password format is invalid. | 密码格式非法。 |
访问错误中心查看更多错误码。