All Products
Search
Document Center

Managed Service for Prometheus:DescribeEnvServiceMonitor

Last Updated:May 09, 2024

Queries the ServiceMonitor details 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
NamespacestringYes

The namespace where the ServiceMonitor is located.

arms-prom
ServiceMonitorNamestringYes

The name of the ServiceMonitor.

arms-admin1

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

40B10E04-81E8-4643-970D-F1B38F2E****
Codeinteger

The HTTP status code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed.

200
Dataobject

The returned struct.

EnvironmentIdstring

The ID of the environment instance.

env-xxxxx
Namespacestring

The namespace.

arms-prom
RegionIdstring

The region ID.

cn-hangzhou
ServiceMonitorNamestring

The name of the ServiceMonitor.

serviceMonitor1
ConfigYamlstring

The YAML configuration string of the ServiceMonitor.

Refer to supplementary instructions.
Statusstring

The status of the ServiceMonitor. Valid values: run and stop.

run
Messagestring

The returned message.

success

Examples

Sample success responses

JSONformat

{
  "RequestId": "40B10E04-81E8-4643-970D-F1B38F2E****",
  "Code": 200,
  "Data": {
    "EnvironmentId": "env-xxxxx",
    "Namespace": "arms-prom",
    "RegionId": "cn-hangzhou",
    "ServiceMonitorName": "serviceMonitor1",
    "ConfigYaml": "Refer to supplementary instructions.",
    "Status": "run"
  },
  "Message": "success"
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history