智能数据洞察 DATAARTS INSIGHT-数据源新增:请求示例

时间:2024-05-16 16:18:23

请求示例

数据源新增。

POST /v1/{project_id}/connections
1.新增公网连接类型数据源
{
  "name": "dws02",
  "server_list": "xx.xx.x.xx:xxxx",
  "database_name": "gaussdb",
  "user_name": "xxxxx",
  "password": "xxxxxxx",
  "config": {
    "ssl": true
  },
  "source": "public",
  "type": "DWS"
}
2.新增DWS云数据源
{
    "name": "dws04_instance",
    "description": "测试新增",
    "source": "dws",
    "type": "DWS",
    "database_name": "xxxxx",
    "user_name": "xxxx",
    "password": "xxxx",
    "region_id": "xxxx",
    "cluster": {
        "id": "xxxxxxxxxxxx"
    },
    "config": {
        "ssl": false
    }
}
3.新增RDS的MySQL云数据源
{
    "name": "mysql_instance",
    "description": "测试新增",
    "source": "rds",
    "type": "MySQL",
    "database_name": "xxxxx",
    "user_name": "xxxxx",
    "password": "xxxxx",
    "region_id": "xxxx",
    "cluster": {
        "id": "xxxxxxxxxxxx"
    },
    "config": {
        "ssl": false
    }
}
4.新增 GaussDB ForMySQL云数据源
{
    "name": "gaussdb_mysql_instance",
    "description": "测试新增",
    "source": "gaussdb",
    "type": "MySQL",
    "database_name": "xxxxx",
    "user_name": "xxxxx",
    "password": "xxxxx",
    "region_id": "xxxx",
    "cluster": {
        "id": "xxxxxxxx"
    },
    "config": {
        "ssl": false
    }
}
5.新增OpenGauss云数据源
{
    "name": "gaussdb_instance",
    "description": "测试新增",
    "source": "gaussdb",
    "type": "OpenGauss",
    "database_name": "xxxxx",
    "user_name": "xxxxx",
    "password": "xxxxx",
    "region_id": "xxxx",
    "cluster": {
        "id": "xxxxxxxx"
    },
    "config": {
        "ssl": false
    }
}
6.新增PostgreSQL云数据源
{
    "name": "postgre_instance",
    "description": "测试新增",
    "source": "rds",
    "type": "PostgreSQL",
    "database_name": "xxxxx",
    "user_name": "xxxxx",
    "password": "xxxxx",
    "region_id": "xxxx",
    "cluster": {
        "id": "xxxxxxxx"
    },
    "config": {
        "ssl": false
    }
}
support.huaweicloud.com/api-dataartsinsight/CreateDataConnection.html