调用OnsInstanceBaseInfo接口查询实例基本信息和收发消息的接入点。
使用说明
客户端需要通过接入点接入消息队列RocketMQ版完成消息的收发,可通过调用本接口查询实例接入点。
QPS限制
本接口的单用户QPS限制为50次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见QPS限制。
授权信息
默认仅限阿里云账号使用本接口,RAM用户只有在被授予了相关API操作权限后方可使用。本接口的授权信息如下表所示。更多信息,请参见权限策略和示例。
API |
Action |
Resource |
---|---|---|
OnsInstanceBaseInfo |
mq:QueryInstanceBaseInfo |
acs:mq:*:*:{instanceId} |
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | OnsInstanceBaseInfo |
系统规定参数。取值:OnsInstanceBaseInfo。 |
InstanceId | String | 是 | MQ_INST_138015630679****_BAAy1Hac |
需查询实例的ID。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
InstanceBaseInfo | Object |
实例信息对象。 |
|
Endpoints | Object |
各个协议的接入点。 |
|
TcpEndpoint | String | http://MQ_INST_138015630679****_BAAy1Hac.cn-chengdu.mq-internal.aliyuncs.com:8080 |
TCP协议内网接入点。 |
TcpInternetEndpoint | String | http://MQ_INST_138015630679****_BAAy1Hac.mq.cn-chengdu.aliyuncs.com:80 |
TCP协议公网接入点。
|
HttpInternetEndpoint | String | http://138015630679****.mqrest.cn-chengdu.aliyuncs.com |
HTTP协议公网接入点。 |
HttpInternalEndpoint | String | http://138015630679****.mqrest.cn-chengdu-internal.aliyuncs.com |
HTTP协议内网接入点。 |
HttpInternetSecureEndpoint | String | https://138015630679****.mqrest.cn-chengdu.aliyuncs.com |
HTTPS协议公网接入点。 |
IndependentNaming | Boolean | true |
实例是否有命名空间。取值说明如下:
|
MaxTps | Long | 10000 |
消息收发TPS上限。取值如下: 5000、10000、20000、50000、100000、200000、300000、500000、800000、1000000。 详细的解释以购买页的说明为准。 说明 该参数仅适用于消息队列RocketMQ版铂金版实例。
|
Remark | String | onspre-cn-m7r1r5f**** |
备注。 |
InstanceName | String | test |
实例名称。 长度限制为3~64 个字符,可以是中文、英文、数字、短划线(-)以及下划线(_)。 |
ReleaseTime | Long | 1603555200000 |
铂金版实例过期时间。 |
TopicCapacity | Integer | 50 |
该实例下允许创建的Topic数量上限。取值如下: 25、50、100、300、500。 说明 该参数仅适用于消息队列RocketMQ版铂金版实例。
|
InstanceStatus | Integer | 5 |
实例状态。取值说明如下:
|
InstanceId | String | MQ_INST_138015630679****_BAAy1Hac |
实例ID。 |
InstanceType | Integer | 2 |
实例类型。取值说明如下:
消息队列RocketMQ版的实例类型和规格信息,请参见实例规格。 |
RequestId | String | 6CC46974-65E8-4C20-AB07-D20D102E**** |
公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。 |
示例
请求示例
http(s)://ons.cn-chengdu.aliyuncs.com/?Action=OnsInstanceBaseInfo
&InstanceId=MQ_INST_138015630679****_BAAy1Hac
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<OnsInstanceBaseInfoResponse>
<InstanceBaseInfo>
<Endpoints>
<TcpEndpoint>http://MQ_INST_138015630679****_BAAy1Hac.cn-chengdu.mq-internal.aliyuncs.com:8080</TcpEndpoint>
<HttpInternetEndpoint>http://138015630679****.mqrest.cn-chengdu.aliyuncs.com</HttpInternetEndpoint>
<HttpInternalEndpoint>http://138015630679****.mqrest.cn-chengdu-internal.aliyuncs.com</HttpInternalEndpoint>
<HttpInternetSecureEndpoint>https://138015630679****.mqrest.cn-chengdu.aliyuncs.com</HttpInternetSecureEndpoint>
<TcpInternetEndpoint>http://MQ_INST_138015630679****_BAAy1Hac.mq.cn-chengdu.aliyuncs.com:80</TcpInternetEndpoint>
</Endpoints>
<IndependentNaming>true</IndependentNaming>
<MaxTps>10000</MaxTps>
<Remark>onspre-cn-m7r1r5f****</Remark>
<InstanceName>test</InstanceName>
<ReleaseTime>1603555200000</ReleaseTime>
<TopicCapacity>50</TopicCapacity>
<InstanceStatus>5</InstanceStatus>
<InstanceId>MQ_INST_138015630679****_BAAy1Hac</InstanceId>
<InstanceType>2</InstanceType>
</InstanceBaseInfo>
<RequestId>6CC46974-65E8-4C20-AB07-D20D102E****</RequestId>
</OnsInstanceBaseInfoResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"InstanceBaseInfo" : {
"Endpoints" : {
"TcpEndpoint" : "http://MQ_INST_138015630679****_BAAy1Hac.cn-chengdu.mq-internal.aliyuncs.com:8080",
"HttpInternetEndpoint" : "http://138015630679****.mqrest.cn-chengdu.aliyuncs.com",
"HttpInternalEndpoint" : "http://138015630679****.mqrest.cn-chengdu-internal.aliyuncs.com",
"HttpInternetSecureEndpoint" : "https://138015630679****.mqrest.cn-chengdu.aliyuncs.com",
"TcpInternetEndpoint" : "http://MQ_INST_138015630679****_BAAy1Hac.mq.cn-chengdu.aliyuncs.com:80"
},
"IndependentNaming" : true,
"MaxTps" : 10000,
"Remark" : "onspre-cn-m7r1r5f****",
"InstanceName" : "test",
"ReleaseTime" : 1603555200000,
"TopicCapacity" : 50,
"InstanceStatus" : 5,
"InstanceId" : "MQ_INST_138015630679****_BAAy1Hac",
"InstanceType" : 2
},
"RequestId" : "6CC46974-65E8-4C20-AB07-D20D102E****"
}
错误码
访问错误中心查看更多错误码。