History
Introduction
API Category
Making API Requests
Region APIs
Instance APIs
Cloud Hosting Cluster APIs
Image APIs
Instance Launch Template APIs
Placement Group APIs
Key APIs
Security Group APIs
Network APIs
Data Types
Error Codes
PUT /asrqueue/<queueId> HTTP/1.1Host: <BucketName-APPID>.ci.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>Content-Length: <length>Content-Type: application/xml<body>
<Request><Name>My-Queue-asr</Name><State>Active</State><NotifyConfig><State>On</State><Url>http://callback.demo.com</Url><Type>Url</Type><Event>TaskFinish,WorkflowFinish</Event><ResultFormat>JSON</ResultFormat></NotifyConfig></Request>
节点名称(关键字) | 父节点 | 描述 | 类型 | 是否必选 | 默认值 | 限制 |
Request | 无 | 保存结果的容器 | Container | 是 | 无 | 无 |
节点名称(关键字) | 父节点 | 描述 | 类型 | 默认值 | 是否必选 |
Name | Request | 队列名称,仅支持中文、英文、数字、_、-和*,长度不超过128 | String | 无 | 是 |
State | Request | Active 表示队列内的作业会被调度执行 Paused 表示队列暂停,作业不再会被调度执行,队列内的所有作业状态维持在暂停状态,已经执行中的任务不受影响 | String | 无 | 是 |
NotifyConfig | Request | 回调配置 | Container | 无 | 是 |
节点名称(关键字) | 父节点 | 描述 | 类型 | 默认值 | 是否必选 |
State | Request.NotifyConfig | 回调开关 Off On | String | Off | 否 |
Event | Request.NotifyConfig | 回调事件 TaskFinish:任务完成 WorkflowFinish:工作流完成 | String | 无 | 当 State = On 时,必选 |
ResultFormat | Request.NotifyConfig | 回调格式 XML JSON | String | XML | 否 |
Type | Request.NotifyConfig | 回调类型 Url TDMQ | String | 无 | 当 State = On 时,必选 |
Url | Request.NotifyConfig | 回调地址,不能为内网地址。 | String | 无 | 当 State = On,且 Type = Url 时,必选 |
MqMode | Request.NotifyConfig | TDMQ 使用模式 Topic:主题订阅 Queue: 队列服务 | String | 无 | 当 State = On,且 Type = TDMQ 时,必选 |
MqRegion | Request.NotifyConfig | TDMQ 所属园区,目前支持园区 sh(上海)、bj(北京)、gz(广州)、cd(成都)、hk(中国香港) | String | 无 | 当 State = On,且 Type = TDMQ 时,必选 |
MqName | Request.NotifyConfig | TDMQ 主题名称 | String | 无 | 当 State = On,且 Type = TDMQ 时,必选 |
<Response><RequestId>NjJmNDczY2RfOTBmYTUwNjRfNTA4ZV85</RequestId><Queue><QueueId>p4a17eeea29334bf499b7e20e2fbfd99d</QueueId><Name>My-Queue-asr</Name><State>Active</State><NotifyConfig><Url>http://callback.demo.com</Url><Event>TaskFinish,WorkflowFinish</Event><Type>Url</Type><State>On</State><ResultFormat>JSON</ResultFormat><MqMode/><MqName/><MqRegion/></NotifyConfig><MaxSize>10000</MaxSize><MaxConcurrent>10</MaxConcurrent><BucketId>test007-1251704708</BucketId><Category>Speeching</Category><UpdateTime>2022-08-09T16:23:11+0800</UpdateTime><CreateTime>2022-08-09T16:13:05+0800</CreateTime></Queue></Response>
节点名称(关键字) | 父节点 | 描述 | 类型 |
Response | 无 | 保存结果的容器 | Container |
节点名称(关键字) | 父节点 | 描述 | 类型 |
RequestId | Response | 请求的唯一 ID | String |
Queue | Response | 队列信息 | Container |
节点名称(关键字) | 父节点 | 描述 | 类型 |
QueueId | Response.Queue | 队列 ID | String |
Name | Response.Queue | 队列名字 | String |
State | Response.Queue | 当前状态,Active 或者 Paused | String |
NotifyConfig | Response.Queue | 回调配置,同 Request.NotifyConfig | Container |
MaxSize | Response.Queue | 队列最大长度 | Int |
MaxConcurrent | Response.Queue | 当前队列最大并行执行的任务数 | Int |
Category | Response.Queue | 队列类型 | String |
UpdateTime | Response.Queue | 更新时间 | String |
CreateTime | Response.Queue | 创建时间 | String |
BucketId | Response.Queue | 队列所属存储桶的 ID | String |
PUT /asrqueue/p4a17eeea29334bf499b7e20e2fbfd99d HTTP/1.1Authorization: q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=****************************************Host: test-1234567890.ci.ap-chongqing.myqcloud.comContent-Length: 162Content-Type: application/xml<Request><Name>My-Queue-asr</Name><State>Active</State><NotifyConfig><State>On</State><Url>http://callback.demo.com</Url><Type>Url</Type><Event>TaskFinish,WorkflowFinish</Event><ResultFormat>JSON</ResultFormat></NotifyConfig></Request>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 100Connection: keep-aliveDate: Thu, 09 Aug 2022 16:23:12 GMTServer: tencent-cix-ci-request-id: NjJmNDczY2RfOTBmYTUwNjRfNTA4ZV85<Response><RequestId>NjJmNDczY2RfOTBmYTUwNjRfNTA4ZV85</RequestId><Queue><QueueId>p4a17eeea29334bf499b7e20e2fbfd99d</QueueId><Name>My-Queue-asr</Name><State>Active</State><NotifyConfig><Url>http://callback.demo.com</Url><Event>TaskFinish,WorkflowFinish</Event><Type>Url</Type><State>On</State><ResultFormat>JSON</ResultFormat><MqMode/><MqName/><MqRegion/></NotifyConfig><MaxSize>10000</MaxSize><MaxConcurrent>10</MaxConcurrent><BucketId>test-1234567890</BucketId><Category>Speeching</Category><UpdateTime>2022-08-09T16:23:11+0800</UpdateTime><CreateTime>2022-08-09T16:13:05+0800</CreateTime></Queue></Response>
文档反馈