账号密码

1.1实例帐号密码获取

Url:

Action请求方法备注
GetEndpointInfoGET同步接口

Request Params:

请求参数数据类型是否必填备注
InstanceIdString实例Id

Response Params:

响应参数数据类型备注
InstanceIdString实例Id
AccountString账号
PasswordString密码
UrlString仅当单实例时显示 amqp://userName:password@hostName:portNumber/

demo:

请求实例:

curl -X GET \
  'https://open.cn-east-1.163yun.com/nqs?Action=GetEndpointInfo&Version=2017-12-01&InstanceId=91401f82e50b42f49564afb6043d3fd4' \

请求响应:

http status code
2xx : 请求成功 
4xx : 客户端错误 
5xx : 服务端错误(客户端可重试)   

成功:
{
    "InstanceId": "91401f82e50b42f49564afb6043d3fd4",
    "Account": "l6BdifQl",
    "Password": "AVHeNVKRoB8x8jTYTzvaMtyZoZoIbzjb",
    "Url": "amqp://l6BdifQl:AVHeNVKRoB8x8jTYTzvaMtyZoZoIbzjb@10.18.196.30:5672"
}

{
    "Code":"InvalidParameterValue",  
    "Message":"Value xxx for parameter InstanceId is invalid",
    "RequestId":"bcdf0f8b-767d-4a9e-b63f-e188ce5af96f"
}  

1.2实例密码更新

Url:

Action请求方法备注
UpdateEndpointPasswordGET同步接口

Request Params:

请求参数数据类型是否必填备注
InstanceIdString实例Id

Response Params:

响应参数数据类型备注
InstanceIdString实例Id
AccountString账号
PasswordString密码
UrlString仅当单实例时显示 amqp://userName:password@hostName:portNumber/

demo:

请求实例:

curl --request GET \
  --url 'https://open.cn-east-1.163yun.com/nqs?Action=UpdateEndpointPassword&Version=2017-12-01&InstanceId=db97fff962da4b92bdea5a57862e90bb' \

请求响应:

http status code
2xx : 请求成功 
4xx : 客户端错误 
5xx : 服务端错误(客户端可重试)   

成功:
{
    "RequestId": "123",
    "InstanceId": "db97fff962da4b92bdea5a57862e90bb",
    "Account": "BuW3MZAT",
    "Password": "07VCSVGJngLsXirXr91NY78Ihx4pOeoM",
    "Url": "amqp://BuW3MZAT:07VCSVGJngLsXirXr91NY78Ihx4pOeoM@10.18.195.248:5672"
}

失败:
{
    "Code":"InvalidParameterValue",  
    "Message":"Value xxx for parameter InstanceId is invalid",
    "RequestId":"bcdf0f8b-767d-4a9e-b63f-e188ce5af96f"
}