调用该接口创建声码排程时间段。

QPS限制

单个阿里云账号调用该接口的每秒请求数(QPS)最大限制为2。

说明 RAM用户共享阿里云账号配额。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String CreateSchedulePeriod

系统规定参数。取值:CreateSchedulePeriod。

Description String test

时间段描述,长度为1~64个字符,一个汉字占两个字符。

EndTime String 01:00

时间段结束时间,格式为二十四小时制时间,范围为00:00~23:59,不能早于StartTime。

ScheduleCode String Md3ZiTL888K9llXDy7890***********

排程唯一标识。

SoundCodeContent String www.taobao.com

时间段声码解析内容,长度为1~512个字符,一个汉字占两个字符。

StartTime String 00:00

时间段开始时间,格式为二十四小时制时间,范围为00:00~23:59。

IotInstanceId String iot_instc_pu****_c*-v64********

实例ID。您可在物联网平台控制台的实例概览页面,查看当前实例的ID

注意
  • 若有ID值,必须传入该ID值,否则调用会失败。
  • 若无ID值,则无需传入。

实例的更多信息,请参见如何获取实例ID

调用API时,除了本文介绍的该API的特有请求参数,还需传入公共请求参数。公共请求参数说明,请参见公共参数文档

返回数据

名称 类型 示例值 描述
Code String iot.soundcodeservice.NotSigned

调用失败时,返回的错误码。更多信息,请参见错误码

Data String Md3ZiTL888K9llXDy7890***********

时间段唯一标识。

ErrorMessage String sound code service has not been signed

调用失败时,返回的错误信息。

RequestId String 66FF51D3-***-49F1-B1A2-***

阿里云为该请求生成的唯一标识符。

Success Boolean true

是否调用成功。

  • true:调用成功。
  • false:调用失败。

示例

请求示例

http(s)://iot.cn-shanghai.aliyuncs.com/?Action=CreateSchedulePeriod
&Description=test
&EndTime=01:00
&ScheduleCode=Md3ZiTL888K9llXDy7890***********
&SoundCodeContent=www.taobao.com
&StartTime=00:00
&<公共请求参数>

正常返回示例

XML格式

<CreateSchedulePeriodResponse>
  <RequestId>66FF51D3-***-49F1-B1A2-***</RequestId>
  <Data>Md3ZiTL888K9llXDy7890***********</Data>
  <Success>true</Success>
</CreateSchedulePeriodResponse>

JSON格式

{
    "RequestId": "66FF51D3-***-49F1-B1A2-***",
    "Data": "Md3ZiTL888K9llXDy7890***********",
    "Success": "true"
}

错误码

HttpCode 错误码 错误信息 描述
403 iot.soundcodeservice.NotSigned sound code service has not been signed 声码服务未开通
400 iot.scheduleperiod.InvalidIotInstanceId invalid IotInstanceId 无效的实例ID
400 iot.scheduleperiod.InvalidTime invalid period time 无效的时间
400 iot.scheduleperiod.InvalidDesc Invalid period description 无效的时间段描述
400 iot.soundcode.InvalidSoundCodeContent invalid sound code content 无效的声码内容
400 iot.soundcodeschedule.NotExists schedule not exists 排程不存在
400 iot.soundcode.SensitiveContent sensitive content 内容包含敏感词汇
400 iot.scheduleperiod.ConflictTime conflict with:%s 时间冲突
400 iot.scheduleperiod.ConflictWithScheduleTime conflict with schedule time 与排程时间冲突
400 iot.scheduleperiod.LimitExceeded schedule period limit exceeded 时间段超限

访问错误中心查看更多错误码。