CreateEnvCustomJob - 创建环境的自定义Job

更新时间:
复制为 MD 格式

创建环境的自定义Job。

调试

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

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
RegionIdstring

地域 ID。

cn-hangzhou
AliyunLangstring

语言环境, 默认为中文 zh | en。

zh
EnvironmentIdstring

环境实例 ID。

env-xxxxxx
CustomJobNamestring

自定义 Job 名称。

customJob1
ConfigYamlstring

自定义 Job 的 yaml 配置串。

参见补充说明。

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

Id of the request

4C518054-852F-4023-ABC1-4AF95FF7****
Codeinteger

状态码。200 为成功,其他状态码为异常。

200
Datastring

返回成功增加的 customJob 名称,或异常信息。

cutomJob1
Messagestring

返回结果的提示信息。

success

示例

正常返回示例

JSON格式

{
  "RequestId": "4C518054-852F-4023-ABC1-4AF95FF7****",
  "Code": 200,
  "Data": "cutomJob1",
  "Message": "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