按地域查询云主机(分页)

本页目录

https://www.cloudam.cn/vps/cvmresource/querybyregion?pageNum={PAGENUM}&pageSize={PAGESIZE}&accountId={ACCOUNTID}&region={REGION}&provider={PROVIDER}

请求方式:GET

按地域查询云主机(分页)

URL Parameters

ParameterTypeDescription
PAGENUMString页数(默认第0页)
Example: 0
PAGESIZEString页面大小(默认为10)
Example: 10
REGIONString地域英文名
Example: mainland
ACCOUNT_IDString你的Cloudam账户ID, Cloudam会随Token一起提前发送给客户
Example: demoaccount
PROVIDERString云厂商
Example: ALIYUN

Request(请求)

Headers(HTTP头) 注: 请首先联系Cloudam获取API Token,token相当于密码,请妥善保护。

{
"Authorization": "Bearer ${token}",
"Content-Type": "application/json"
}

Response(响应) - 200

Headers(响应头)

{
"Content-Type": "application/json"
}

Body(响应体JSON) -- 正确响应

{
"data" : {
"content" : [
{
"ipAddr" : "1.2.3.4",
"regionId" : "cn-shenzhen",
"username" : "Xiaoyee",
"eipId" : "eip-2zeqn8z5i28sbnzyvsjwf",
"associatedId" : "36eef71fe6744e67a092ee1221b23181",
"createdAt" : NumberLong(1575342481100),
"validTill" : NumberLong(1575442481104),
"status" : "Running",
"isEIP" : true,
"isDeleted" : false,
"isStopped" : false,
"ports" : [
{
"start" : 22,
"end" : 22
},
{
"start" : 443,
"end" : 443
},
{
"start" : 80,
"end" : 80
},
{
"start" : 3389,
"end" : 3389
},
{
"start" : 8080,
"end" : 8080
}
],
"_class" : "com.edgec.intelligroup.domain.CvmResourceExpiration"
}
],
"size" : 10,
"totalElements" : 14,
"totalPages" : 1
},
"success" : true,
"errorCode": ""
}

Response Body Attributes(响应Body属性)

AttributeTypeDescription
contentArray查询返回内容
pageableJSON当前分页信息
totalElementsint总的数据量
totalPagesint总的页数
successBoolean是否查询成功
true:查询成功,false: 查询失败
errorCodeString 如果执行失败,则此属性不为空,可能取值如下:
User.IpNotExist:用户名下无法找到该ip,Instance.NotReady:该实例暂时不可用,请稍后重试或咨询管理员.