All Products
Search
Document Center

Managed Service for Prometheus:UpdateEnvPodMonitor

Last Updated:May 09, 2024

Updates the PodMonitor 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
AliyunLangstringNo

The language. Valid values: zh and en. Default value: zh.

zh
EnvironmentIdstringYes

The environment ID.

env-xxxxx
NamespacestringYes

The namespace where the PodMonitor is located.

arms-prom
PodMonitorNamestringYes

The name of the PodMonitor.

arms-admin-pm1
DryRunbooleanNo

Specifies whether to perform only a dry run, without performing the actual request.

true
ConfigYamlstringYes

The YAML configuration string.

Refer to supplementary instructions.

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

C21AB7CF-B7AF-410F-BD61-82D1567F****
Codeinteger

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

200
Dataobject

The returned struct.

MatchedMsgstring

Indicates whether targets are matched.

Match successful.
MatchedTargetCountstring

The number of matched targets.

1
Messagestring

The returned message.

success

Examples

Sample success responses

JSONformat

{
  "RequestId": "C21AB7CF-B7AF-410F-BD61-82D1567F****",
  "Code": 200,
  "Data": {
    "MatchedMsg": "Match successful.\n",
    "MatchedTargetCount": "1"
  },
  "Message": "success"
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history