All Products
Search
Document Center

Application Real-Time Monitoring Service:ListEnvCustomJobs

Last Updated:Feb 01, 2024

Queries the custom jobs of an environment.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

cn-hangzhou
EnvironmentIdstringYes

The ID of the environment instance.

env-xxxxx
EncryptYamlbooleanNo

Specifies whether to return the encrypted YAML string.

true

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

2A0CEDF1-06FE-44AC-8E21-21A5BE65****
Codeinteger

The HTTP status code. The status code 200 indicates that the request was successful.

200
Dataobject []

The returned struct.

EnvironmentIdstring

The ID of the environment instance.

env-xxxx
RegionIdstring

The region ID.

cn-hangzhou
CustomJobNamestring

The name of the custom job.

job1
ConfigYamlstring

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

Refer to supplementary instructions.
Statusstring

The status of the custom job.

run
CreationTimestampstring

The time when the custom job was created. The value of this parameter is a timestamp.

2022-01-01T10:11:34Z
AddonNamestring

The name of the component to which the custom job belongs.

mysql
AddonReleaseNamestring

The instance name of the component.

mysql1
AddonVersionstring

The version of the component.

1.1.0
ScrapeConfigsobject []

The capture configurations.

JobNamestring

The name of the job.

custom-sd-demo
ScrapeIntervalstring

The capture interval.

30s
MetricsPathstring

The path of the metric.

/metrics
ScrapeDiscoverysarray

The service discovery methods.

string

The service discovery method.

static_configs
Messagestring

The returned message.

success

Examples

Sample success responses

JSONformat

{
  "RequestId": "2A0CEDF1-06FE-44AC-8E21-21A5BE65****",
  "Code": 200,
  "Data": [
    {
      "EnvironmentId": "env-xxxx",
      "RegionId": "cn-hangzhou",
      "CustomJobName": "job1",
      "ConfigYaml": "Refer to supplementary instructions.",
      "Status": "run",
      "CreationTimestamp": "2022-01-01T10:11:34Z",
      "AddonName": "mysql",
      "AddonReleaseName": "mysql1",
      "AddonVersion": "1.1.0",
      "ScrapeConfigs": [
        {
          "JobName": "custom-sd-demo",
          "ScrapeInterval": "30s",
          "MetricsPath": "/metrics",
          "ScrapeDiscoverys": [
            "static_configs"
          ]
        }
      ]
    }
  ],
  "Message": "success"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history