CreateApplication

更新时间:
复制 MD 格式

Creates an application attached to a PolarDB instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

polardb:CreateApplication

get

*All Resource

*

None None

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

Description

string

No

The description of the application.

myapp

Parameters

array<object>

No

A list of parameters.

object

No

A list of parameters.

ParameterName

string

No

The name of the parameter.

secret.gateway.auth.token

ParameterValue

string

No

The value of the parameter.

TK***

ApplicationType

string

Yes

The type of the application. Valid values:

  • supabase: Creates a managed Supabase application.

  • raycluster: Creates a managed Ray Cluster application.

  • polarclaw: Creates a managed PolarClaw application.

supabase

DBClusterId

string

No

The ID of the PolarDB instance that the application depends on.

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

RegionId

string

No

The region. The default value is the region of the instance.

cn-beijing

ZoneId

string

No

The zone. The default value is the primary zone of the instance.

cn-beijing-k

VSwitchId

string

No

The vSwitch. The default value is the current vSwitch in the primary zone of the instance.

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

Architecture

string

Yes

The CPU architecture. Valid value:

  • x86

x86

SecurityIPList

string

No

The IP address whitelist. If you do not specify this parameter, the default value 127.0.0.1 is used.

127.0.0.1,172.17.0.0/24

SecurityIPType

string

No

The type of the IP address.

ipv4

SecurityIPArrayName

string

No

The name of the IP address whitelist group. The default value is default.

default

Endpoints

array<object>

No

A list of custom server-side endpoints. By default, a VPC Endpoint is created.

object

No

The server-side endpoint.

Description

string

No

The description of the server-side endpoint.

my_endpoint

EndpointType

string

No

The type of the server-side endpoint. This value is fixed to Primary.

Primary

Components

array<object>

No

A list of custom child components for the application.

object

No

The child component of the application.

ComponentType

string

No

The type of the child component.

For supabase, valid values are:

  • gateway

  • backend

For raycluster, valid values are:

  • head

  • worker

  • gpuworker

gateway

ComponentClass

string

No

The specifications of the child component.

polar.app.g2.medium

ComponentReplica

integer

No

The number of replicas for the child component. The default value is 1.

1

SecurityIPList

string

No

The IP address whitelist for the child component. Separate multiple IP addresses with commas (,).

127.0.0.1

SecurityIPType

string

No

The type of the IP address in the whitelist for the child component. The default value is ipv4.

ipv4

SecurityIPArrayName

string

No

The name of the IP address whitelist group for the child component. The default value is default.

default

SecurityGroups

string

No

The security groups for the child component. Separate multiple security group IDs with commas (,).

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

ComponentMaxReplica

integer

No

The maximum number of child components with the same specifications. The default value is the value of ComponentReplica.

  • This parameter is supported only for raycluster.

1

ScaleMin

string

No

The minimum number of component replicas for scaling.

1

ScaleMax

string

No

The maximum number of component replicas for scaling.

16

PayType

string

No

The billing method.

Postpaid

AutoRenew

boolean

No

Specifies whether to enable auto-renewal.

true

Period

string

No

The subscription period type.

Year

UsedTime

string

No

The subscription duration.

1

ResourceGroupId

string

No

The ID of the resource group.

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

DryRun

boolean

No

The default value is false. If you set this parameter to true, the system only checks the parameters and resources without creating the actual resources.

false

PolarFSInstanceId

string

No

The ID of the PolarFileSystem (PolarFS) cold storage or high-performance instance. This parameter is empty by default. If you specify this parameter, the corresponding storage is mounted to the application.

This feature is currently supported only by the following applications:

  • supabase

  • raycluster

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

VpcId

string

No

The ID of the Virtual Private Cloud (VPC).

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

AutoCreatePolarFs

boolean

No

Specifies whether to automatically create a PolarFS cold storage instance. Valid values:

  • false (default): Does not automatically create the instance.

  • true: Automatically creates the instance.

false

AutoUseCoupon

boolean

No

Specifies whether to automatically use a coupon. Valid values:

  • true (default): Uses a coupon.

  • false: Does not use a coupon.

true

PromotionCode

string

No

The coupon code. If you do not specify this parameter, the default coupon is used.

727xxxxxx934

SecurityGroupId

string

No

The ID of the security group.

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

MemApplicationSpec

object

No

This parameter is required for mem0 applications.

LlmModel

string

No

This parameter is required for mem0 applications. It specifies the name of the large language model (LLM), such as qwen3-max.

qwen3-max

EmbedderModel

string

No

This parameter is required for mem0 applications. It specifies the name of the embedder model, such as text-embedding-v4.

text-embedding-v4

RerankerModel

string

No

This parameter is required for mem0 applications. It specifies the name of the reranker model, such as qwen3-rerank.

qwen3-rerank

ProjectName

string

No

The project name. This corresponds to the schema in the database where project data is stored.

test-project-name

DbName

string

No

The name of the database.

test-database-name

DbUser

string

No

The username.

test-user

DbPassword

string

No

The password.

test-user-password

GraphLlmModel

string

No

The graph LLM.

qwen-plus

EmbedderModelDimension

integer

No

The vector dimensions.

1024

Shard

integer

No

The number of sharded tables.

1

KnowledgeApplicationSpec

object

No

This parameter is required for knowledge applications.

LlmModel

string

No

This parameter is required for knowledge applications. It specifies the name of the LLM, such as qwen3-max.

DbPassword

string

No

The password.

DashboardPassword

string

No

The password for the dashboard.

ModelFrom

string

No

The source of the model. Valid values:

  • bailian: Alibaba Cloud Model Studio model.

  • custom: A custom model.

  • maas: PolarDB model operator.

bailian

AIDBClusterId

string

No

The ID of an existing model operator instance to associate. This parameter is effective only when ApplicationType is set to polarclaw.

pm-xxxxxx

ModelApiKey

string

No

The API key for the model. This parameter is effective only when ApplicationType is set to polarclaw.

sk-xxxxxx

ModelBaseUrl

string

No

The URL of the model. This parameter is effective only when ApplicationType is set to polarclaw.

https://dashscope.aliyuncs.com/compatible-mode/v1

ModelApi

string

No

The model API. This parameter is effective only when ApplicationType is set to polarclaw.

openai-completions

ModelName

string

No

The name of the model. This parameter is effective only when ApplicationType is set to polarclaw.

qwen3-max

AutoAllocatePublicEip

boolean

No

Specifies whether to automatically create and bind an Elastic IP Address (EIP).

qwen3-max

Tag

array<object>

No

The tag.

object

No

The tag.

Key

string

No

The key of the tag.

testKey

Value

string

No

The value of the tag.

testValue

TargetVersion

string

No

The target version.

latest

AuthProvider

string

No

The authentication service provider.

feishu

AuthProviderConfig

string

No

The configuration of the authentication provider.

xxx

SkillTemplateId

string

No

The ID of the skill template.

xxx

Response elements

Element

Type

Description

Example

object

Schema of Response

ResourceAvailable

boolean

Indicates whether the resources are sufficient. This parameter is returned only when DryRun is set to true.

true

ApplicationId

string

The ID of the application.

pa-********************

Description

string

The description of the application.

myapp

Components

array<object>

A list of child components.

object

The child component.

ComponentId

string

The ID of the child component.

pac-********************

OrderId

string

The ID of the generated order.

2148126708*****

RequestId

string

The ID of the request.

3E5CD764-FCCA-5C9C-838E-20E0DE84B2AF

ResourceGroupId

string

The ID of the resource group.

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

Examples

Success response

JSON format

{
  "ResourceAvailable": true,
  "ApplicationId": "pa-********************",
  "Description": "myapp",
  "Components": [
    {
      "ComponentId": "pac-********************"
    }
  ],
  "OrderId": "2148126708*****",
  "RequestId": "3E5CD764-FCCA-5C9C-838E-20E0DE84B2AF",
  "ResourceGroupId": "rg-********************"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.