用于创建一个附属于PolarDB实例的应用。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
polardb:CreateApplication |
get |
*全部资源
|
无 | 无 |
请求语法
POST HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Description |
string |
否 |
应用描述/备注 |
myapp |
| ApplicationType |
string |
是 |
应用类型,取值范围为
|
supabase |
| DBClusterId |
string |
否 |
应用依赖的 PolarDB 实例 ID |
pc-************** |
| RegionId |
string |
否 |
地域,默认为实例地域 |
cn-beijing |
| ZoneId |
string |
否 |
可用区,默认为实例主可用区 |
cn-beijing-k |
| VSwitchId |
string |
否 |
交换机,默认为实例主可用区当前的交换机 |
vsw-********************* |
| Architecture |
string |
是 |
CPU 架构,取值范围
|
x86 |
| SecurityIPList |
string |
否 |
||
| SecurityIPType |
string |
否 |
||
| SecurityIPArrayName |
string |
否 |
||
| Endpoints |
array<object> |
否 |
用户自定义的服务端点列表,默认创建一个 VPC Endpoint |
|
|
object |
否 |
服务端点 |
||
| Description |
string |
否 |
服务端点备注 |
my_endpoint |
| EndpointType |
string |
否 |
服务端点类型,固定为 Primary |
Primary |
| Components |
array<object> |
否 |
用户自定义的应用子组件列表 |
|
|
object |
否 |
应用子组件 |
||
| ComponentType |
string |
否 |
应用子组件的类型 对于 supabase,取值范围为
对于 raycluster,取值范围为
|
gateway |
| ComponentClass |
string |
否 |
应用子组件的规格 |
polar.app.g2.medium |
| ComponentReplica |
integer |
否 |
应用子组件的副本数量,默认为 1 |
1 |
| SecurityIPList |
string |
否 |
应用子组件的白名单 IP 地址,英文逗号分隔 |
127.0.0.1 |
| SecurityIPType |
string |
否 |
应用子组件的白名单 IP 的类型,默认为 ipv4 |
ipv4 |
| SecurityIPArrayName |
string |
否 |
应用子组件白名单 IP 地址组的名称,默认为 default |
default |
| SecurityGroups |
string |
否 |
应用子组件的安全组列表,使用英文逗号分隔 |
sg-******************** |
| ComponentMaxReplica |
integer |
否 |
同一规格应用子组件的最大数量,默认等于 ComponentReplica
|
1 |
| ScaleMin |
string |
否 |
||
| ScaleMax |
string |
否 |
||
| PayType |
string |
否 |
付费类型 |
Postpaid |
| AutoRenew |
boolean |
否 |
自动续费 |
true |
| Period |
string |
否 |
包年或包月类型 |
Year |
| UsedTime |
string |
否 |
期限 |
1 |
| ResourceGroupId |
string |
否 |
资源组 ID |
rg-******************** |
| DryRun |
boolean |
否 |
默认为 |
false |
| PolarFSInstanceId |
string |
否 |
Polarlakebase 冷存版/高性能版实例 ID,默认为空,若传入则将相应存储挂载到应用中 目前仅如下应用支持
|
pcs-******************** |
| VpcId |
string |
否 |
||
| AutoCreatePolarFs |
boolean |
否 |
是否自动创建冷存版 Polarlakebase,取值:
|
false |
| AutoUseCoupon |
boolean |
否 |
是否自动使用优惠券,取值:
|
true |
| PromotionCode |
string |
否 |
优惠券编号,不填时使用默认优惠券 |
727xxxxxx934 |
| SecurityGroupId |
string |
否 |
安全组 ID |
|
| MemApplicationSpec |
object |
否 |
mem0 应用必传 |
|
| LlmModel |
string |
否 |
mem0 应用必传,llm 模型名称,如 qwen3-max |
|
| EmbedderModel |
string |
否 |
mem0 应用必传,embdder 模型名称,如 text-embedding-v4 |
|
| RerankerModel |
string |
否 |
mem0 应用必传,reranker 模型名称,如 qwen3-rerank |
|
| ProjectName |
string |
否 |
项目名称,对应数据库存放项目数据的 schema |
|
| DbName |
string |
否 |
数据库名 |
|
| DbUser |
string |
否 |
用户名 |
|
| DbPassword |
string |
否 |
密码 |
|
| GraphLlmModel |
string |
否 |
图 LLM 模型 |
|
| EmbedderModelDimension |
integer |
否 |
向量维度 |
|
| Shard |
integer |
否 |
分表数量 |
|
| ModelFrom |
string |
否 |
模型来源,取值:
|
bailian |
| AIDBClusterId |
string |
否 |
关联已有模型算子实例 id,仅当 ApplicationType 为 polarclaw 时生效 |
pm-xxxxxx |
| ModelApiKey |
string |
否 |
模型 API KEY,仅当 ApplicationType 为 polarclaw 时生效 |
sk-xxxxxx |
| ModelBaseUrl |
string |
否 |
模型地址,仅当 ApplicationType 为 polarclaw 时生效 |
https://dashscope.aliyuncs.com/compatible-mode/v1 |
| ModelApi |
string |
否 |
模型 api,仅当 ApplicationType 为 polarclaw 时生效 |
openai-completions |
| ModelName |
string |
否 |
模型名称,仅当 ApplicationType 为 polarclaw 时生效 |
qwen3-max |
| AutoAllocatePublicEip |
boolean |
否 |
||
| Tag |
array<object> |
否 |
||
|
object |
否 |
|||
| Key |
string |
否 |
testKey |
|
| Value |
string |
否 |
testValue |
|
| TargetVersion |
string |
否 |
latest |
|
| AuthProvider |
string |
否 |
feishu |
|
| AuthProviderConfig |
string |
否 |
xxx |
|
| SkillTemplateId |
string |
否 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| ResourceAvailable |
boolean |
资源是否满足,仅 |
true |
| ApplicationId |
string |
应用 ID |
pa-******************** |
| Description |
string |
应用备注 |
myapp |
| Components |
array<object> |
子组件列表 |
|
|
object |
子组件 |
||
| ComponentId |
string |
子组件 ID |
pac-******************** |
| OrderId |
string |
生成的订单 ID |
2148126708***** |
| RequestId |
string |
请求 ID |
3E5CD764-FCCA-5C9C-838E-20E0DE84B2AF |
| ResourceGroupId |
string |
资源组 ID |
rg-******************** |
示例
正常返回示例
JSON格式
{
"ResourceAvailable": true,
"ApplicationId": "pa-********************",
"Description": "myapp",
"Components": [
{
"ComponentId": "pac-********************"
}
],
"OrderId": "2148126708*****",
"RequestId": "3E5CD764-FCCA-5C9C-838E-20E0DE84B2AF",
"ResourceGroupId": "rg-********************"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。