全部產品
Search
文件中心

Managed Service for Prometheus:DescribeEnvCustomJob - 查詢環境CustomJob詳情

更新時間:Apr 10, 2026

查詢環境CustomJob詳情。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

當前API暫無授權資訊透出。

請求參數

名稱

類型

必填

描述

樣本值

RegionId

string

地區 ID。

cn-hangzhou

EnvironmentId

string

環境執行個體 ID。

env-xxxxxx

CustomJobName

string

自訂 job 名稱。

customJob1

EncryptYaml

boolean

是否返回加密後的 YAML 串。

true

返回參數

名稱

類型

描述

樣本值

object

Schema of Response

RequestId

string

Id of the request

6A9AEA84-7186-4D8D-B498-4585C6A2****

Code

integer

狀態代碼。說明 200 表示成功。

200

Data

object

返回結構體。

EnvironmentId

string

環境執行個體 ID。

env-xxxxx

RegionId

string

地區 ID。

cn-hangzhou

CustomJobName

string

自訂 job 名稱。

customJob1

ConfigYaml

string

請求參數 encryptYamltrue,則返回 base64 編碼後的 YAML 串。否則返回明文 YAML 串。

參見補充說明。

Status

string

狀態:

  • run

  • stop

枚舉值:

  • stop :

    stop

  • run :

    run

run

Message

string

返回結果的提示資訊。

success

ConfigYaml 樣本:

scrape_configs:
- job_name: job-demo1
  honor_timestamps: false
  honor_labels: false
  scrape_interval: 30s
  scheme: http
  metrics_path: /metric
  static_configs:
  - targets:
    - 127.0.0.1:9090
- job_name: job-demo2
  honor_timestamps: false
  honor_labels: false
  scrape_interval: 30s
  scheme: http
  metrics_path: /metric
  static_configs:
  - targets:
    - 127.0.0.1:9090
  http_sd_configs:
  - url: 127.0.0.1:9090
    refresh_interval: 30s

樣本

正常返回樣本

JSON格式

{
  "RequestId": "6A9AEA84-7186-4D8D-B498-4585C6A2****",
  "Code": 200,
  "Data": {
    "EnvironmentId": "env-xxxxx",
    "RegionId": "cn-hangzhou",
    "CustomJobName": "customJob1",
    "ConfigYaml": "參見補充說明。",
    "Status": "run"
  },
  "Message": "success"
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情