Creates a ServiceMonitor for an environment.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID. | cn-hangzhou |
AliyunLang | string | No | The language. Valid values: zh and en. Default value: zh. | zh |
EnvironmentId | string | Yes | The ID of the environment instance. | env-xxxxxx |
DryRun | boolean | No | Specifies whether to perform only a dry run, without performing the actual request. | true |
ConfigYaml | string | Yes | The YAML configuration string of the ServiceMonitor. | Refer to supplementary instructions. |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "78901766-3806-4E96-8E47-CFEF59E4****",
"Code": 200,
"Data": {
"MatchedMsg": "Match successful.\n",
"Namespace": "arms-prom",
"ServiceMonitorName": "arms-admin1",
"MatchedTargetCount": 1
},
"Message": "message"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|
No change history