调用CreateSmartAccessGatewayClientUser接口创建用户。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String CreateSmartAccessGatewayClientUser

系统规定参数。取值:CreateSmartAccessGatewayClientUser

RegionId String cn-shanghai

智能接入网关App实例所在地域ID。

SmartAGId String sag-gnhe6sywtare5****

智能接入网关App实例ID。

UserName String doctest

用户名,同一个智能接入网关App实例下的用户名不可以重复。

名称长度为7~33个字符,必须以大小写字母或数字开头,可以包含下划线(_) 、at(@)、半角句号(.)和短划线(-)。

说明 用户名和密码相互依赖,若指定用户名则必须指定密码,反之,若指定密码则必须指定用户名。
ClientIp String 10.0.XX.XX
  • 如果开启客户端App服务,需要设置App的IP地址。当前账号始终保持以选择的IP地址接入。
说明 设置App的IP地址必须在私网网段内。
  • 如果关闭客户端App服务,系统自动从私网网段内分配可用IP地址,每次重连IP地址都会重新分配。
UserMail String username@example.com

普通用户的邮箱地址,用于管理员向普通用户发送登录App的账号信息。

Bandwidth Long 20

带宽峰值。单位:Kbps。取值范围:1 Kbps~20000 Kbps。默认值:2000 Kbps

Password String duuf****

登录智能接入网关App的密码。

密码命名规则: 8~32位字符,以(A-Za-z0-9)开头,可包含数字、英文大小写、下划线(_)、at(@)、短划线(-)。

返回数据

名称 类型 示例值 描述
UserName String doc

用户名。

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

请求ID。

UserMail String username@example.com

普通用户的邮箱地址。

Bandwidth Integer 20

带宽峰值。单位:Kbps。

ClientIp String 10.0.XX.XX

客户端App的IP地址。

示例

请求示例

http(s)://[Endpoint]/?Action=CreateSmartAccessGatewayClientUser
&RegionId=cn-shanghai
&SmartAGId=sag-gnhe6sywtare5****
&UserName=doctest
&ClientIp=10.0.XX.XX
&UserMail=username@example.com
&Bandwidth=20
&Password=duuf****
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateSmartAccessGatewayClientUserResponse>
    <UserName>doc</UserName>
    <RequestId>72E82F5E-66E8-4C22-BF1F-5CEB7DC132E7</RequestId>
    <UserMail>username@example.com</UserMail>
    <Bandwidth>20</Bandwidth>
    <ClientIp>10.0.XX.XX</ClientIp>
</CreateSmartAccessGatewayClientUserResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

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

错误码

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. 密码格式非法。

访问错误中心查看更多错误码。