Deletes a data source.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DeleteDataSource

The operation that you want to perform.

DataSourceId Long Yes 1

The ID of the data source. You can call the ListDataSources operation to obtain the ID.

RegionId String Yes cn-shanghai

The region ID of the data source. For example, the ID of the China (Shanghai) region is cn-shanghai, and that of the China (Zhangjiakou) region is cn-zhangjiakou. The system automatically determines the value of this parameter based on the endpoint used to call the operation.

Response parameters

Parameter Type Example Description
Data Boolean true

Indicates whether the request is successful.

HttpStatusCode String 200

The HTTP status code returned.

RequestId String 0bc1411515937635****

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DeleteDataSource
&DataSourceId=1
&RegionId=cn-shanghai
&<Common request parameters>

Sample success responses

XML format

<RequestId>0bc1411515937635****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Data>true</Data>
<Success>true</Success>

JSON format

{
    "RequestId": "0bc1411515937635****",
    "HttpStatusCode": 200,
    "Data": true,
    "Success": true
}

Error codes

HTTP status code Error code Error message Description
400 Invalid.Tenant.ConnectionNotExists The connection does not exist. The error message returned because the specified data source does not exist.
400 Invalid.Tenant.ProjectNotExists The project does not exist. The error message returned because the specified workspace does not exist.
403 Invalid.Tenant.UserIsNotProjectOwnerOrAdmin The user is not a project administrator or owner. The error message returned because the user is not the workspace owner or administrator.
400 Invalid.Tenant.UserNotInProject The user is not in the project. The error message returned because the user is not added to the workspace.
403 Invalid.Tenant.UserNotInTenant The user is not in tenant. The error message returned because the user does not belong to the tenant.
400 Invalid.Operation You cannot delete the bindingCalcEngine that is bound to the data source. The error message returned because the compute engine instance with which the data source is associated is not allowed to be deleted.

For a list of error codes, visit the API Error Center.