All Products
Search
Document Center

PolarDB:CreateContextDB

Last Updated:Sep 10, 2026

Creates a ContextDB-X instance.

Operation description

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The ID of the region where the instance resides. > You can call the DescribeRegions operation to query the regions supported by PolarDB-X, including region IDs.

cn-hangzhou

DBInstanceName

string

Yes

The name of the instance.

pxc-********

OpenSearchInstanceName

string

Yes

The name of the PolarDB-X Search instance.

pxs-********

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

A501A191-BD70-5E50-98A9-C2A486A82****

Data

object

The returned result.

TaskId

integer

The task ID.

2209883

ContextDBInstanceName

string

The name of the context service instance.

pxt-*********

ServiceReplicaSetName

string

The name of the context service service instance.

pxt-*********-s

DashboardReplicaSetName

string

The name of the context service dashboard instance.

pxt-*********-d

ContextDBAdminKey

string

The administrator key of the context service.

ctx-admin-***

OpenSearchInstanceName

string

The name of the PolarDB-X Search instance.

pxs-*********

DBInstanceName

string

The instance ID.

pxc-*********

AccessDeniedDetail

object

The details of the access denial.

AuthAction

string

As described above.

xxx

AuthPrincipalType

string

The type of the authentication principal.

222

AuthPrincipalOwnerId

string

The owner ID of the authentication principal.

111

AuthPrincipalDisplayName

string

The display name of the authentication principal.

xxx

PolicyType

string

The policy type.

PRIORITY

NoPermissionType

string

NoPermissionType

ImplicitDeny

EncodedDiagnosticMessage

string

The encoded diagnostic message.

AQEAAAAAaKPfwjY0MzMyODRGLUZCQkQtNTA1RS04MUUxLTc5NTkzODk2MUIzMg==

Examples

Success response

JSON format

{
  "RequestId": "A501A191-BD70-5E50-98A9-C2A486A82****",
  "Data": {
    "TaskId": 2209883,
    "ContextDBInstanceName": "pxt-*********",
    "ServiceReplicaSetName": "pxt-*********-s",
    "DashboardReplicaSetName": "pxt-*********-d",
    "ContextDBAdminKey": "ctx-admin-***",
    "OpenSearchInstanceName": "pxs-*********",
    "DBInstanceName": "pxc-*********"
  },
  "AccessDeniedDetail": {
    "AuthAction": "xxx",
    "AuthPrincipalType": "222",
    "AuthPrincipalOwnerId": "111",
    "AuthPrincipalDisplayName": "xxx",
    "PolicyType": "PRIORITY",
    "NoPermissionType": "ImplicitDeny",
    "EncodedDiagnosticMessage": "AQEAAAAAaKPfwjY0MzMyODRGLUZCQkQtNTA1RS04MUUxLTc5NTkzODk2MUIzMg=="
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.