All Products
Search
Document Center

PolarDB:CreateContext0

Last Updated:Sep 10, 2026

Creates a context service.

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 region in which the instance resides.

cn-hangzhou

DBInstanceName

string

Yes

The instance ID.

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.

9B2F3840-5C98-475C-B269-2D5C3A31797C

Data

object

The instance data.

TaskId

integer

The backend task ID.

2209883

ServiceReplicaSetName

string

The name of the context service instance.

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

DashboardReplicaSetName

string

The name of the context service dashboard instance.

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

OpenSearchInstanceName

string

The name of the PolarDB-X Search instance.

pxs-*********

DBInstanceName

string

The instance name.

pxc-*********

Context0InstanceName

string

The name of the context service instance.

context0-example

Context0AdminKey

string

The administrator key of the context service.

admin-key-example

AccessDeniedDetail

object

The details of the access denial.

AuthAction

string

The authentication action.

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.

System

NoPermissionType

string

NoPermissionType

ImplicitDeny

EncodedDiagnosticMessage

string

The encoded diagnostic message.

AQEAAAAAaKPfwjY0MzMyODRGLUZCQkQtNTA1RS04MUUxLTc5NTkzODk2MUIzMg==

Examples

Success response

JSON format

{
  "RequestId": "9B2F3840-5C98-475C-B269-2D5C3A31797C",
  "Data": {
    "TaskId": 2209883,
    "ServiceReplicaSetName": "pxt-*********-s",
    "DashboardReplicaSetName": "pxt-*********-d",
    "OpenSearchInstanceName": "pxs-*********",
    "DBInstanceName": "pxc-*********",
    "Context0InstanceName": "context0-example",
    "Context0AdminKey": "admin-key-example"
  },
  "AccessDeniedDetail": {
    "AuthAction": "xxx",
    "AuthPrincipalType": "222",
    "AuthPrincipalOwnerId": "111",
    "AuthPrincipalDisplayName": "xxx",
    "PolicyType": "System",
    "NoPermissionType": "ImplicitDeny",
    "EncodedDiagnosticMessage": "AQEAAAAAaKPfwjY0MzMyODRGLUZCQkQtNTA1RS04MUUxLTc5NTkzODk2MUIzMg=="
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.