All Products
Search
Document Center

AnalyticDB:CreateApsDatasoure

Last Updated:Jul 16, 2026

Creates an APS data source.

Operation description

For the service registration of this service, refer to Endpoint.

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

adb:CreateApsDatasoure

none

*DBClusterLakeVersion

acs:adb:{#regionId}:{#AccountId}:dbcluster/{#DBClusterId}

None None

Request parameters

Parameter

Type

Required

Description

Example

DBClusterId

string

Yes

The cluster ID.

amv-xxxxx

RegionId

string

Yes

The region ID.

cn-shanghai

DatasourceType

string

Yes

The data source type.

KAFKA

DatasourceName

string

Yes

The data source name.

sls-******

DatasourceDescription

string

No

The data source description.

description

Mode

string

No

The mode.

ALI_CLOUD_INSTANCE

SlsInfo

object

No

The Simple Log Service (SLS) information for the data source to be created.

-

SourceRegionId

string

No

The region ID of the source cluster.

cn-beijing

Project

string

No

The Simple Log Service (SLS) project.

test-project

Store

string

No

sls logstore.

test-store

Across

boolean

No

Specifies whether cross-account access is enabled.

false

AcrossUid

string

No

The UID of the cross-account.

xxxx

AcrossRole

string

No

The role name for cross-account access.

yyy

KafkaInfo

object

No

The Kafka information.

-

KafkaClusterId

string

No

The Kafka instance ID.

******

KafkaTopic

string

No

The assigned Kafka topic name.

test

HiveInfo

object

No

The Hive data source information.

-

MetaStoreUri

string

No

The MetaStore endpoint.

******

Vswitch

string

No

The vSwitch ID.

vsw-bp1*****k

SecurityGroup

string

No

The security group.

sg-uf*******h

ClusterId

string

No

The instance ID.

******

HostConfig

string

No

The host configuration.

******

RdsMysqlInfo

object

No

The ApsaraDB RDS for MySQL data source information.

-

InstanceId

string

No

The instance ID.

rm-xxxxxxx

UserName

string

No

The username.

Username.

Password

string

No

The password.

******

RegionId

string

No

The region ID.

cn-shanghai

ConnectUrl

string

No

The read-only instance endpoint.

******

SecurityGroup

string

No

The security group.

sg-******

PolarDBMysqlInfo

object

No

The PolarDB for MySQL data source information.

-

InstanceId

string

No

The instance ID.

pc-bp*********

UserName

string

No

The username.

test-user-name

Password

string

No

The password.

***

RegionId

string

No

The region ID.

cn-shanghai

ConnectUrl

string

No

The custom RDS endpoint.

****

SecurityGroup

string

No

The security group.

sg-******

Across

boolean

No

Specifies whether cross-account access is enabled. Valid values:

  • true: The current network instance is a cross-account resource.

  • false: The current network instance is a resource within the current account.

false

AcrossUid

string

No

The UID of the cross-account.

123456789*

AcrossRole

string

No

The cross-account role.

test-role

PolarDBXInfo

object

No

The PolarDB-X data source information.

-

InstanceId

string

No

The OceanBase cluster ID.

-

DatabricksInfo

object

No

The Databricks data source information.

-

AccessToken

string

No

The access token.

******

WorkspaceURL

string

No

The workspace URL.

xxxxx

Response elements

Element

Type

Description

Example

object

HttpStatusCode

integer

The HTTP status code returned. A value of 200 indicates that the request was successful.

200

Data

string

The detailed resource usage of the cluster.

69

RequestId

string

The request ID.

65D2***-45C1-5C18-**********

Success

boolean

The precheck result. Valid values:

  • success: The check passed.

  • false: The check failed.

True

Code

string

The API status or POP error code.

200

Message

string

The additional information of the call result. Valid values:

  • If the request was successful, Success is returned.

  • If the request failed, a specific error code is returned.

OK

DBClusterId

string

The cluster ID.

amv-7xxxxx

Examples

Success response

JSON format

{
  "HttpStatusCode": 200,
  "Data": "69",
  "RequestId": "65D2***-45C1-5C18-**********",
  "Success": true,
  "Code": "200",
  "Message": "OK",
  "DBClusterId": "amv-7xxxxx"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.