Creates a virtual data source instance in the specified workspace. This instance represents a virtual database. You can add Data Definition Language (DDL) statements to it to build virtual databases and tables.
Try it now
You can directly run this API in OpenAPI Explorer without worrying about signature calculation. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.
Try it now
RAM authorization
The following table describes the authorization information for this API. You can use it in the Action element of a RAM policy statement to grant RAM users or RAM roles permission to call this API. Details are as follows:
- Action: the specific permission point.
- Access level: the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: the resource types that support authorization in the operation. Details are as follows:
- Required resource types are marked with a leading asterisk (*).
- For operations that do not support resource-level authorization,
All resourcesis used.
- Condition key: the condition keys defined by the cloud service itself.
- Dependent action: other permissions required to successfully perform the operation. The caller must also have the permissions of the dependent actions for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| dataanalysisgbi:CreateVirtualDatasourceInstance | none | *All resources * |
| None |
Request syntax
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | Yes | The ID of the Alibaba Cloud Model Studio workspace for the current request. | llm-2v3934xtp49esw64 |
| body | object | No | The parameters of the request body. | |
| name | string | No | The name of the virtual data source instance. | virtual-instance-1 |
| description | string | No | The description of the virtual data source instance. | Virtual data source instance description |
| type | integer | No | The type of the virtual data source. Valid values:
| 51 |
Response elements
| Element | Type | Description | Example |
|---|---|---|---|
| object | Result | ||
| data | any | The response data, that is, whether the request was successful. | true |
| errorMsg | string | The error message. | NoAuth |
| code | string | The error code. | NoAuth |
| success | boolean | true indicates that the API call was successful. false indicates that the API call failed. | true |
| requestId | string | The request ID. Each request has a unique ID, which is used for troubleshooting. | D02D895A-5E58-5A9F-963D-D8B027AB7AE2 |
Examples
Success response
JSON format
Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 401 | NoAuth | Bad Request: Workspace.Illegal.Auth. | The current account does not have permission on the specified workspace. |
| 401 | Internal.Error | Bad Request: Internal Error. | Internal error. Contact customer service personnel for troubleshooting. |