Skip to main content

CreateVirtualDatasourceInstance

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 resources is 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.
ActionAccess levelResource typeCondition keyDependent action
dataanalysisgbi:CreateVirtualDatasourceInstancenone
*All resources
*
    None
None

Request syntax

POST /gbi/virtualDatasource/createVirtualDatasourceInstance HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
workspaceIdstringYes

The ID of the Alibaba Cloud Model Studio workspace for the current request.

llm-2v3934xtp49esw64
bodyobjectNo

The parameters of the request body.

namestringNo

The name of the virtual data source instance.

virtual-instance-1
descriptionstringNo

The description of the virtual data source instance.

Virtual data source instance description
typeintegerNo

The type of the virtual data source.

Valid values:
  • 51: MySQL virtual data source.
  • 52: PostgreSQL virtual data source.
51

Response elements

ElementTypeDescriptionExample
object

Result

dataany

The response data, that is, whether the request was successful.

true
errorMsgstring

The error message.

NoAuth
codestring

The error code.

NoAuth
successboolean

true indicates that the API call was successful. false indicates that the API call failed.

true
requestIdstring

The request ID. Each request has a unique ID, which is used for troubleshooting.

D02D895A-5E58-5A9F-963D-D8B027AB7AE2

Examples

Success response JSON format
{
  "data": true,
  "errorMsg": "NoAuth",
  "code": "NoAuth",
  "success": true,
  "requestId": "D02D895A-5E58-5A9F-963D-D8B027AB7AE2"
}

Error codes

HTTP status codeError codeError messageDescription
401NoAuthBad Request: Workspace.Illegal.Auth.The current account does not have permission on the specified workspace.
401Internal.ErrorBad Request: Internal Error.Internal error. Contact customer service personnel for troubleshooting.
See the Error Center for more error codes.