调用ListCalcEngines查看计算引擎列表。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String ListCalcEngines

系统规定参数。取值:ListCalcEngines

RegionId String cn-shanghai

计算引擎所属的地域信息。例如,华东2(上海)为cn-shanghai,华北3(张家口)为cn-zhangjiakou。您无需填写RegionId,会根据调用的Endpoint自动解析。

ProjectId Long 27

计算引擎所属的DataWorks工作空间。

Name String abc

查询的计算引擎名称,精确匹配。

CalcEngineType String ODPS

计算引擎类型。目前支持ODPSEMRBLINKHOLOMaxGraphHYBRIDDB_FOR_POSTGRESQLADB_MYSQLHADOOP_CDH,不区分大小写。

EnvType String PRD

计算引擎所属的环境,包括开发环境(DEV)和生产环境(PRD)。

PageSize Integer 10

每页显示的条数,默认为100条,最大100条。

PageNumber Integer 1

分页查询页码。大于等于1的正整数,默认为1。

返回数据

名称 类型 示例值 描述
HttpStatusCode Integer 200

HTTP状态码。

RequestId String 0bc1ec92159376****

请求ID。

Success Boolean true

是否成功查看计算引擎列表。

Data Object

计算引擎的分页查询结果。

PageNumber Integer 1

页码。

PageSize Integer 20

每页显示的条数,默认为10条,最大100条。

TotalCount Integer 1

计算引擎的总数。

CalcEngines Array of CalcEngines

计算引擎列表。

BindingProjectName String abc

计算引擎关联的工作空间名称。

IsDefault Boolean true

是否为当前类型的默认计算引擎。

EngineId Integer 35

计算引擎ID。

DwRegion String cn-zhangjiakou

计算引擎关联的DataWorks工作空间所在的地域。

TaskAuthType String PROJECT

计算引擎的访问身份。

  • USER 当前用户
  • PROJECT 项目执行用户
  • SUBACCOUNT 子账号
  • STS_ROLE sts角色
CalcEngineType String ODPS

计算引擎类型。值枚举列表 ODPSEMRBLINKHOLOMaxGraphHYBRIDDB_FOR_POSTGRESQLADB_MYSQLHADOOP_CDH

EngineInfo Map

计算引擎的详细信息。

  • ODPS
    
    {
      "pubEndpoint": "service.cn.maxcompute.aliyun.com/api",
      "endpoint": "service.cn.maxcompute.aliyun-inc.com/api",
      "resourceGroupType": "ODPS",
      "resourceGroupId": "361826516****",
      "vpcEndpoint": "service.cn.maxcompute.aliyun-inc.com/api",
      "projectName": "onefall_test_zjk",
      "taskSameAsOwner": "true"
    }
    
  • EMR

{
  "emrClusterId": "C-xxx",
  "specs": "{\"emrClusterId\":\"C-xxx\",\"emrAccessMode\":\"simple\",\"emrResourceQueueName\":\"default\",\"emrProjectId\":\"FP-xxx\"}",
  "endpoint": "emr.aliyuncs.com",
  "emrResourceQueueName": "default",
  "emrAccessMode": "simple",
  "resourceGroupType": "DW",
  "projectName": "xx-xxxx",
  "emrProjectId": "FP-xxxx",
  "taskSameAsOwner": "false"
}       
  • BLINK

{
  "bayesProjectId": "xxxx",
  "bayesProjectName": "xc_blxxixxxnk_1",
  "cluster": "xxxssxsx",
  "endpoint": "https://stream.console.aliyun.com",
  "engineType": "BLINK",
  "name": "xsxsxxxxx",
  "projectName": "xc_blxxxsxink_1",
  "queue": "root.xc_blxsxxxxxxink_1",
  "resourceGroupType": "DW",
  "specs": "{\"cluster\":\"xxxxxx\",\"bayesProjectName\":\"xc_blxxixxxnk_1\",\"bayesProjectId\":\"ssxxxsa\",\"name\":\"sxsxsxxx\",\"queue\":\"root.sxxsxxsx\"}",
  "taskSameAsOwner": false
}
  • HOLO

{
  "endpoint": "hgprecn-cn-xsxssxsx-cn-shanghai-internal.hologres.aliyuncs.com:80",
  "engineType": "ODPS",
  "odpsEndpoint": "hgprecn-cn-xsxssxxs-cn-shanghai-internal.hologres.aliyuncs.com:80",
  "odpsProjectName": "xsxssxsxsx",
  "projectName": "xsxssxsxsx",
  "resourceGroupType": "DW",
  "specs": "{\"pubEndpoint\":\"hgprecn-cn-xsxssxsxs-cn-shanghai.hologres.aliyuncs.com:80\",\"commonBuyInstanceId\":\"hgprecn-cn-xsxsxsxs\",\"project\":\"holo_upxsxgrade1\",\"common_buy_instance_id\":\"hgprecn-cn-xsxsxs\",\"endpoint\":\"hgprecn-cn-xsxxsxs-cn-shanghai-internal.hologres.aliyuncs.com:80\",\"port\":\"80\",\"host\":\"hgprecn-cn-xsxsxsxs-cn-shanghai-internal.hologres.aliyuncs.com\",\"vpcEndpoint\":\"hgprecn-cn-xsxsxsxs-cn-shanghai-vpc.hologres.aliyuncs.com:80\",\"authType\":2,\"region\":\"cn-shanghai\"}",
  "taskSameAsOwner": false
}
  • MaxGraph

{
  "endpoint": "http://pre-graphcompute.aliyuncs.com",
  "engineType": "ODPS",
  "odpsEndpoint": "http://pre-graphcompute.aliyuncs.com",
  "odpsProjectName": "xsxsxsxs",
  "projectName": "xsxsxsxs",
  "resourceGroupType": "DW",
  "taskSameAsOwner": false
}
  • HYBRIDDB_FOR_POSTGRESQL

{
  "endpoint": "hybriddb_for_postgresql_mo12121ck_endpoint",
  "engineType": "ODPS",
  "odpsEndpoint": "hybriddb_for_postgresql_m121212ock_endpoint",
  "odpsProjectName": "sxasaxsaxaxas",
  "projectName": "sxasaxsaxaxas",
  "resourceGroupType": "DW",
  "specs": "{\"connectionString\":\"gp-xsxsxsxxs.gpdb.rds.aliyuncs.com\",\"database\":\"xsxsxxsxs\",\"password\":\"xxxxxxx\",\"instanceId\":\"gp-cdcdacdacda\",\"port\":\"3432\",\"ownerId\":\"12121212\",\"username\":\"sdasaddsa\"}",
  "taskSameAsOwner": false
}
  • ADB_MYSQL

{
  "endpoint": "adb_mysql_mock_endpoint",
  "engineType": "ODPS",
  "odpsEndpoint": "adb_mysql_mock_endpoint",
  "odpsProjectName": "am-xsaxaxa",
  "projectName": "am-xsxsaxa",
  "resourceGroupType": "DW",
  "specs": "{\"connectionString\":\"am-xsaxsa.ads.aliyuncs.com:3306\",\"database\":\"xsaxsaxa\",\"password\":\"xsaxsaxassxsa\",\"instanceId\":\"am-xsaxsasx\",\"username\":\"xsaxsadsd\"}",
  "taskSameAsOwner": false
}
  • HADOOP_CDH

{
  "bindingBaseId": "xsaxsaxs",
  "endpoint": "xsaaaaa",
  "engineType": "ODPS",
  "odpsEndpoint": "axsxaxssxs",
  "odpsProjectName": "ssxxax",
  "projectName": "xsaxsaxsa",
  "resourceGroupId": 45208xxxxxx,
  "resourceGroupType": "GATEWAY",
  "specs": "{\"cluster\":{\"hive\":{\"hiveServer2Url\":\"jdbc:hive2://xxxxxxer-1-cn-shanghai-pre-kerberos-1:10000\",\"hiveMetastore\":\"thrift://xxxxxxxr-1-cn-shanghai-pre-kerberos-1:9083\",\"version\":\"2.1.1\"},\"configFiles\":{\"coreSite\":\"4534574xxxxxx\",\"hdfsSite\":\"453457919xxxxxxx\",\"mapredSite\":\"45345750xxxxxx\",\"yarnSite\":\"4534575xxxxx\",\"krb5Conf\":\"4534576xxxxx1\",\"hiveSite\":\"453457xxxxx20\"},\"spark\":{\"version\":\"2.4.0\"},\"cdh\":{\"version\":\"6.3.2\"},\"hdfs\":{\"version\":\"3.0.0\"},\"impala\":{\"impalaUrl\":\"jdbc:impala://cdh-xsxssxxsx-1-cn-shanghai-pre-kerberos-1:21050\",\"version\":\"3.2.0\"},\"yarn\":{\"YarnUrl\":\"http://cdh-xsxsxsxsxs-1-cn-shanghai-pre-kerberos-1:8032\",\"webUrl\":\"http://cdh-xsxsxssxxssx-1-cn-shanghai-pre-kerberos-1:8088\",\"version\":\"3.0.0\"},\"presto\":{\"prestoUrl\":\"jdbc:presto://cdh-xssxsxxsxsxs-1-cn-shanghai-pre-kerberos-1:8080/hive/default\",\"version\":\"0.244.1\"}},\"instanceId\":161sdads733,\"authDetail\":{\"principal\":\"hive@HADOOP.COM\",\"keytabFileId\":\"45345815xsxsxs3\",\"type\":\"kerberos\",\"username\":\"xsxsxsxsa@HADOOP.COM\"},\"resGroupStatus\":\"\",\"hadoopAuthType\":\"kerberos\",\"clusterIdentifier\":\"xssxsxsxsx\",\"clusterId\":xsxsx,\"resGroupId\":4520870619xsxssxxs,\"accessMode\":\"security\",\"authType\":2}",
  "taskSameAsOwner": false
}
EnvType String PRD

计算引擎所在的环境。

  • DEV 开发环境
  • PRD 生产环境
Region String cn-zhangjiakou

计算引擎所在的地域。

GmtCreate String Oct 10, 2019 3:42:44 PM

计算引擎的创建时间。时间戳

BindingProjectId Integer 27

计算引擎绑定的工作空间ID。

Name String abc

计算引擎的显示名称。

TenantId Long 1234567

租户ID。

示例

请求示例

http(s)://[Endpoint]/?Action=ListCalcEngines
&ProjectId=27
&Name=abc
&CalcEngineType=ODPS
&EnvType=PRD
&PageSize=10
&PageNumber=1
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<ListCalcEnginesResponse>
    <HttpStatusCode>200</HttpStatusCode>
    <RequestId>0bc1ec92159376****</RequestId>
    <Success>true</Success>
    <Data>
        <PageNumber>1</PageNumber>
        <PageSize>20</PageSize>
        <TotalCount>1</TotalCount>
        <CalcEngines>
            <BindingProjectName>abc</BindingProjectName>
            <IsDefault>true</IsDefault>
            <EngineId>35</EngineId>
            <DwRegion>cn-zhangjiakou</DwRegion>
            <TaskAuthType>PROJECT</TaskAuthType>
            <CalcEngineType>ODPS</CalcEngineType>
            <EnvType>PRD</EnvType>
            <Region>cn-zhangjiakou</Region>
            <GmtCreate>Oct 10, 2019 3:42:44 PM</GmtCreate>
            <BindingProjectId>27</BindingProjectId>
            <Name>abc</Name>
            <TenantId>1234567</TenantId>
        </CalcEngines>
    </Data>
</ListCalcEnginesResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "HttpStatusCode" : 200,
  "RequestId" : "0bc1ec92159376****",
  "Success" : true,
  "Data" : {
    "PageNumber" : 1,
    "PageSize" : 20,
    "TotalCount" : 1,
    "CalcEngines" : {
      "BindingProjectName" : "abc",
      "IsDefault" : true,
      "EngineId" : 35,
      "DwRegion" : "cn-zhangjiakou",
      "TaskAuthType" : "PROJECT",
      "CalcEngineType" : "ODPS",
      "EnvType" : "PRD",
      "Region" : "cn-zhangjiakou",
      "GmtCreate" : "Oct 10, 2019 3:42:44 PM",
      "BindingProjectId" : 27,
      "Name" : "abc",
      "TenantId" : 1234567
    }
  }
}

错误码

HttpCode 错误码 错误信息 描述
400 Invalid.Tenant.ConnectionNotExists The connection does not exist. 数据源不存在。
400 Invalid.Tenant.ProjectNotExists The project does not exist. 项目不存在。
400 Invalid.Tenant.UserNotInProject The user is not in the project. 用户不在项目中。
400 Invalid.CalcEngineEnvType The specified envType %s is invalid. 传入的引擎环境类型非法
400 Invalid.CalcEngineType The specified calcEngineType %s is invalid. 传入的引擎类型非法
403 Invalid.Tenant.UserIsNotProjectOwnerOrAdmin The user is not a project administrator or owner. 用户不是项目负责人或者项目管理员。
403 Invalid.Tenant.UserNotInTenant The user is not in tenant. 用户不在租户中。

访问错误中心查看更多错误码。