Queries the details of a custom job for an environment.
Try it now
Test
RAM authorization
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 |
参见补充说明。 |
| Status |
string |
The status. Valid values:
Valid values:
|
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.