接口协议
接口 | https://[endpoint].ctapi.ctyun.cn/v1/exchange/create | ||
请求方式 | POST | ||
请求参数 | 是否必填 | 参数类型 | 说明 |
prodInstId | 是 | String | 实例ID |
vhost | 是 | String | vhost名称 |
name | 是 | String | 队列名称 |
type | 否 | 单选(direct、topic、fanout、headers、x-delayed-message) | 选择存储数据的节点 |
x-delayed-type | 当type为x-delayed-message必选 | 单选(direct、topic、fanout、headers) | 延迟队列的交换器类型 |
durable | 否 | Boolean | 是否持久化 |
auto_delete | 否 | Boolean | 是否自动删除 |
internal | 否 | Boolean | 选择存储数据的节点 |
arguments | 否 | String | 其他参数,请参照下表,格式:{x-message-ttl: 123, x-overflow: "reject-publish", x-queue-mode: "lazy",…} |
响应参数 | 参数类型 | 描述 | |
statusCode | String | 接口系统层面状态码。成功:800,失败:900 | |
message | String | 描述状态 | |
returnObj | String | 返回对象。此参数所包含的参数请见“响应示例"里面的注释 | |
Arguments参数说明
参数名 | 参数类型 | 说明 |
alternate-exchange | String | 备用交换器 |
请求示例
`PUT https://[endpoint].ctapi.ctyun.cn/v1/exchange/create`
返回示例
(1)成功响应示例
{
"returnObj": {"data": null },
"message": "success",
"statusCode": "800"
}(2)失败响应示例
{
"returnObj": {"data": "{\"error\":\"not_found\",\"reason\":\"vhost_not_found\"}"},
"message": "...",
"statusCode": "900"
}