All Products
Search
Document Center

Managed Service for Prometheus:DescribeEnvCustomJob

Last Updated:Aug 28, 2026

Queries the details of a custom job for an environment.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID.

cn-hangzhou

EnvironmentId

string

Yes

The ID of the environment instance.

env-xxxxxx

CustomJobName

string

Yes

The name of the custom job.

customJob1

EncryptYaml

boolean

No

Whether to return an encrypted YAML string.

true

Response elements

Element

Type

Description

Example

object

The schema of the response.

RequestId

string

The request ID.

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

Code

integer

The HTTP status code. 200 indicates a successful request.

200

Data

object

The returned struct.

EnvironmentId

string

The ID of the environment instance.

env-xxxxx

RegionId

string

The region ID.

cn-hangzhou

CustomJobName

string

The name of the custom job.

customJob1

ConfigYaml

string

If EncryptYaml is set to true, a Base64-encoded YAML string is returned. Otherwise, a plaintext YAML string is returned.

参见补充说明。

Status

string

The status. Valid values:

  • run

  • stop

Valid values:

  • stop :

    stop

  • run :

    run

run

Message

string

The returned message.

success

Sample 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

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.