全部產品
Search
文件中心

PolarDB:CreateApplication - 建立PolarDB應用

更新時間:Apr 21, 2026

用於建立一個附屬於PolarDB執行個體的應用。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

polardb:CreateApplication

get

*全部資源

*

請求文法

POST  HTTP/1.1

請求參數

名稱

類型

必填

描述

樣本值

Description

string

應用描述/備忘

myapp

Parameters

array<object>

參數列表

object

參數列表

ParameterName

string

參數名稱

secret.gateway.auth.token

ParameterValue

string

參數值

TK***

ApplicationType

string

應用類型,取值範圍為

  • supabase: 若建立託管 Supabase 應用,請傳入此值

  • raycluster: 若建立託管 Ray Cluster 應用,請傳入此值

  • polarclaw: 若建立託管 PolarClaw 應用,請傳入此值

supabase

DBClusterId

string

應用依賴的 PolarDB 執行個體 ID

pc-**************

RegionId

string

地區,預設為執行個體地區

cn-beijing

ZoneId

string

可用性區域,預設為執行個體主可用性區域

cn-beijing-k

VSwitchId

string

交換器,預設為執行個體主可用性區域當前的交換器

vsw-*********************

Architecture

string

CPU 架構,取值範圍

  • x86

x86

SecurityIPList

string

IP 白名單。如果不填寫,則會預設為127.0.0.1

127.0.0.1,172.17.0.0/24

SecurityIPType

string

IP 位址的類型

ipv4

SecurityIPArrayName

string

IP 白名單組的名稱,預設為default

default

Endpoints

array<object>

使用者自訂的服務端點列表,預設建立一個 VPC Endpoint

object

服務端點

Description

string

服務端點備忘

my_endpoint

EndpointType

string

服務端點類型,固定為 Primary

Primary

Components

array<object>

使用者自訂的應用子組件列表

object

應用子組件

ComponentType

string

應用子組件的類型

對於 supabase,取值範圍為

  • gateway

  • backend

對於 raycluster,取值範圍為

  • head

  • worker

  • gpuworker

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

  • 僅 raycluster 支援該參數

1

ScaleMin

string

組件伸縮下限。

1

ScaleMax

string

組件伸縮上限。

16

PayType

string

付費類型

Postpaid

AutoRenew

boolean

自動續約

true

Period

string

包年或包月類型

Year

UsedTime

string

期限

1

ResourceGroupId

string

資源群組 ID

rg-********************

DryRun

boolean

預設為false,設定為true後將只進行參數和資源校正,不實際建立資源。

false

PolarFSInstanceId

string

Polarlakebase 冷存版/高效能版執行個體 ID,預設為空白,若傳入則將相應儲存掛載到應用中

目前僅如下應用支援

  • supabase

  • raycluster

pcs-********************

VpcId

string

Virtual Private Cloud ID。

vpc-********************

AutoCreatePolarFs

boolean

是否自動建立冷存版 Polarlakebase,取值:

  • false(預設):不自動建立。

  • true:自動建立。

false

AutoUseCoupon

boolean

是否自動使用優惠券,取值:

  • true(預設):使用優惠券。

  • false:不使用優惠券。

true

PromotionCode

string

優惠券編號,不填時使用預設優惠券

727xxxxxx934

SecurityGroupId

string

安全性群組 ID

sg-********************

MemApplicationSpec

object

mem0 應用必傳

LlmModel

string

mem0 應用必傳,llm 模型名稱,如 qwen3-max

qwen3-max

EmbedderModel

string

mem0 應用必傳,embdder 模型名稱,如 text-embedding-v4

text-embedding-v4

RerankerModel

string

mem0 應用必傳,reranker 模型名稱,如 qwen3-rerank

qwen3-rerank

ProjectName

string

專案名稱,對應資料庫存放專案資料的 schema

test-project-name

DbName

string

資料庫名

test-database-name

DbUser

string

使用者名稱

test-user

DbPassword

string

密碼

test-user-password

GraphLlmModel

string

圖 LLM 模型

qwen-plus

EmbedderModelDimension

integer

向量維度

1024

Shard

integer

分表數量

1

KnowledgeApplicationSpec

object

knowledge 應用必傳

LlmModel

string

knowledge 應用必傳,llm 模型名稱,如 qwen3-max

DbPassword

string

密碼

DashboardPassword

string

dashboard 密碼

ModelFrom

string

模型來源,取值:

  • bailian:百鍊模型

  • custom:自訂模型

  • maas:PolarDB 模型運算元

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

是否自動建立並綁定彈性公網 IP

qwen3-max

Tag

array<object>

標籤

object

標籤

Key

string

標籤鍵

testKey

Value

string

標籤值

testValue

TargetVersion

string

目標版本

latest

AuthProvider

string

認證服務提供者

feishu

AuthProviderConfig

string

認證提供者配置

xxx

SkillTemplateId

string

Skill 模版 ID

xxx

返回參數

名稱

類型

描述

樣本值

object

Schema of Response

ResourceAvailable

boolean

資源是否滿足,僅DryRuntrue時返回

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-********************"
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情