添加机型库并预设机型参数配置,创建云手机时指定机型库可匹配其中的预设参数。
本接口的单用户 QPS 限制为 50 次/秒。超过限制,API 调用会被限流。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
| 参数 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | AddPhoneTemplate | 接口名称。当前 API 的名称为 AddPhoneTemplate。 |
| Version | String | 是 | 2025-05-01 | 接口版本。当前 API 的版本为 2025-05-01。 |
| 参数 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| PhoneTemplateName | String | 是 | Oppo1 | 机型库名称,账户下规则名称唯一,长度不能超过 200 个字符。 |
| OverlayProperty | Array of SystemProperty | 否 | - | 实例 Settings 系统属性,非持久化,立即生效,重启实例后失效;详细信息,参考 SystemProperty 定义。 |
| OverlayPersistProperty | Array of SystemProperty | 否 | - | 实例初始化系统属性,持久化,重启实例后生效;详细信息,参考 SystemProperty 定义:适用于只读系统属性,或 AOSP 原生非持久化的系统属性的修改,如 ro.product.model。 |
| OverlaySettings | Array of Settings | 否 | - | 实例 Settings 属性列表;详细信息,参考 Settings 定义。 |
| AospVersion | String | 是 | 10 | AOSP 版本号。 |
Status | Integer | 是 |
| 机型库状态。
|
| 参数 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| SystemPropertyName | String | 是 | ro.product.name | 属性名称,已可修改的系统属性及属性值,参考 System Properties 属性列表。 |
| SystemPropertyValue | String | 是 | samsung | 属性值。 |
SystemPropertyValueType | String | 是 |
| 属性值数据类型。取值如下:
|
| 参数 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| SettingsName | String | 是 | locale_language | 属性名称,已可修改的 Settings 属性及属性值,参考 Settings 属性列表。 |
SettingsType | String | 是 |
| 设置类型,取值如下:
|
SettingsValue | String | 是 |
| 属性值数据类型,取值如下:
|
SettingsValueType | String | 是 |
| 属性值。各类型属性取值示例如下:
|
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
| 参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| PhoneTemplateId | String | 7658996557xxxxxx | 机型库 ID。 |
POST https://open.volcengineapi.com?Action=AddPhoneTemplate&Version=2025-05-01 { "PhoneTemplateName": "Oppo1", "OverlayProperty": [ { "SystemPropertyName": "ro.product.name", "SystemPropertyValue": "samsung", "SystemPropertyValueType": "string" } ], "OverlayPersistProperty": [ { "SystemPropertyName": "ro.product.name", "SystemPropertyValue": "samsung", "SystemPropertyValueType": "string" } ], "OverlaySettings": [ { "SettingsName": "locale_language", "SettingsType": "global", "SettingsValue": "zh-CN", "SettingsValueType": "string" } ], "AospVersion": "10", "Status": 1 }
{ "ResponseMetadata": { "Action": "AddPhoneTemplate", "Region": "cn-north-1", "Service": "ACEP", "Version": "2025-05-01", "RequestId": "20230604110420****100232280022D31" }, "Result": { "PhoneTemplateId": "7658996557xxxxxx" } }
您可访问公共错误码,获取更多错误码信息。