獲取到某個已部署作業下所有作業實例的信息。
調試
您可以在OpenAPI Explorer中直接運行該接口,免去您計算簽名的困擾。運行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。
授權信息
下表是API對應的授權信息,可以在RAM權限策略語句的Action
元素中使用,用來給RAM用戶或RAM角色授予調用此API的權限。具體說明如下:
- 操作:是指具體的權限點。
- 訪問級別:是指每個操作的訪問級別,取值為寫入(Write)、讀取(Read)或列出(List)。
- 資源類型:是指操作中支持授權的資源類型。具體說明如下:
- 對于必選的資源類型,用背景高亮的方式表示。
- 對于不支持資源級授權的操作,用
全部資源
表示。
- 條件關鍵字:是指云產品自身定義的條件關鍵字。
- 關聯操作:是指成功執行操作所需要的其他權限。操作者必須同時具備關聯操作的權限,操作才能成功。
操作 | 訪問級別 | 資源類型 | 條件關鍵字 | 關聯操作 |
---|---|---|---|---|
stream:ListJobs | list | *全部資源 * |
| 無 |
請求語法
GET /api/v2/namespaces/{namespace}/jobs HTTP/1.1
請求參數
名稱 | 類型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
workspace | string | 是 | 工作空間 ID。 | a14bd5d90a**** |
namespace | string | 是 | 項目空間名稱。 | default-namespace |
pageIndex | integer | 否 | 分頁參數,頁碼索引,表示所請求頁碼,最小值為 1,默認值為 1。 | 1 |
pageSize | integer | 否 | 分頁參數,表示所請求頁碼元素數量,最大值為 100,最小值為 1,默認值為 10。 | 10 |
deploymentId | string | 是 | 已部署作業 ID。 | 58718c99-3b29-4c5e-93bb-c9fc4ec6**** |
sortName | string | 否 | 排序規則。 | gmt_create |
返回參數
示例
正常返回示例
JSON
格式
{
"requestId": "CBC799F0-AS7S-1D30-8A4F-882ED4DD****",
"success": true,
"httpCode": 200,
"errorCode": "\"\"",
"errorMessage": "\"\"",
"pageIndex": 1,
"pageSize": 10,
"totalSize": 1,
"data": [
{
"jobId": "354dde66-a3ae-463e-967a-0b4107fd****",
"deploymentId": "354dde66-a3ae-463e-967a-0b4107fd****",
"deploymentName": "flinktest",
"namespace": "namespacetest",
"executionMode": "BATCH",
"creator": "27846363877456****",
"creatorName": "****@streamcompute.onaliyun.com",
"modifier": "27846363877456****",
"modifierName": "****@streamcompute.onaliyun.com",
"startTime": 1660190835,
"endTime": 1660277235,
"engineVersion": "vvr-4.0.14-flink-1.13",
"flinkConf": {
"test": "test",
"test2": 1
},
"status": {
"running": {
"observedFlinkJobRestarts": 4,
"observedFlinkJobStatus": "RUNNING"
},
"riskLevel": "",
"failure": {
"message": "Kubernetes deployment resource with name job-8b7db913-5b1f-4ac5-a332-8d50f342**** is not progressing.",
"reason": "KubernetesDeploymentNotProgressing",
"failedAt": 1660120062
},
"currentJobStatus": "RUNNING",
"healthScore": 0
},
"metric": {
"totalMemoryByte": 4096,
"totalCpu": 2
},
"sessionClusterName": "null",
"artifact": {
"sqlArtifact": {
"sqlScript": "CREATE TEMPORARY TABLE datagen_source( name VARCHAR ) WITH ( 'connector' = 'datagen' ); CREATE TEMPORARY TABLE blackhole_sink( name VARCHAR ) with ( 'connector' = 'blackhole' ); INSERT INTO blackhole_sink SELECT name from datagen_source;",
"additionalDependencies": [
"https://oss/bucket/addition.jar"
]
},
"jarArtifact": {
"jarUri": "https://oss/bucket/test.jar",
"entryClass": "org.apapche.flink.test",
"mainArgs": "start from main",
"additionalDependencies": [
"https://oss/bucket/addition.jar"
]
},
"pythonArtifact": {
"pythonArtifactUri": "https://oss/bucket/test.py",
"mainArgs": "start from main",
"entryModule": "test.py",
"additionalDependencies": [
"https://oss/bucket/addition.py"
],
"additionalPythonLibraries": [
"https://oss/bucket/additionlib.py"
],
"additionalPythonArchives": [
"https://oss/bucket/additionArchives.zip"
]
},
"kind": "SQLSCRIPT"
},
"logging": {
"loggingProfile": "default",
"log4j2ConfigurationTemplate": "xml格式文本",
"log4jLoggers": [
{
"loggerName": "StdOutErrConsoleAppender",
"loggerLevel": "ERROR"
}
],
"logReservePolicy": {
"openHistory": true,
"expirationDays": 7
}
},
"batchResourceSetting": {
"maxSlot": 10,
"basicResourceSetting": {
"parallelism": 4,
"jobmanagerResourceSettingSpec": {
"cpu": 2,
"memory": "4 GiB"
},
"taskmanagerResourceSettingSpec": {
"cpu": 2,
"memory": "4 GiB"
}
}
},
"streamingResourceSetting": {
"resourceSettingMode": "EXPERT",
"expertResourceSetting": {
"jobmanagerResourceSettingSpec": {
"cpu": 2,
"memory": "4 GiB"
},
"resourcePlan": "{\\\"ssgProfiles\\\":[{\\\"name\\\":\\\"default\\\",\\\"cpu\\\":1.13,\\\"heap\\\":\\\"1 gb\\\",\\\"offHeap\\\":\\\"32 mb\\\",\\\"managed\\\":{},\\\"extended\\\":{}}],\\\"nodes\\\":[{\\\"id\\\":1,\\\"type\\\":\\\"StreamExecTableSourceScan\\\",\\\"desc\\\":\\\"Source: datagen_source[78]\\\",\\\"profile\\\":{\\\"group\\\":\\\"default\\\",\\\"parallelism\\\":1,\\\"maxParallelism\\\":32768,\\\"minParallelism\\\":1}},{\\\"id\\\":2,\\\"type\\\":\\\"StreamExecSink\\\",\\\"desc\\\":\\\"Sink: blackhole_sink[79]\\\",\\\"profile\\\":{\\\"group\\\":\\\"default\\\",\\\"parallelism\\\":1,\\\"maxParallelism\\\":32768,\\\"minParallelism\\\":1}}],\\\"edges\\\":[{\\\"source\\\":1,\\\"target\\\":2,\\\"mode\\\":\\\"PIPELINED\\\",\\\"strategy\\\":\\\"FORWARD\\\"}],\\\"vertices\\\":{\\\"717c7b8afebbfb7137f6f0f99beb2a94\\\":[1,2]}}"
},
"basicResourceSetting": {
"parallelism": 4
}
},
"restoreStrategy": {
"kind": "LATEST_STATE",
"allowNonRestoredState": true,
"jobStartTimeInMs": 1660293803155,
"savepointId": "354dde66-a3ae-463e-967a-0b4107fd****"
},
"userFlinkConf": {
"taskmanager.numberOfTaskSlots": "1",
"table.exec.state.ttl": "128000s"
},
"localVariables": [
{
"name": "test",
"value": "datagen"
}
],
"workspace": "edcef******b4f",
"createdAt": "1714058507",
"modifiedAt": "1714058800"
}
]
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
變更時間 | 變更內容概要 | 操作 |
---|---|---|
2024-05-24 | OpenAPI 入參發生變更 | 查看變更詳情 |