All Products
Search
Document Center

Application Real-Time Monitoring Service:AddPrometheusInstance

Last Updated:Nov 05, 2024

Creates a Prometheus instance for Remote Write.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
arms:AddPrometheusInstancenone
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

cn-hangzhou
NamestringYes

The name of the Prometheus instance for Remote Write.

notificationpolicy_test
TypestringYes

The type of the Prometheus instance. Only Prometheus instances for Remote Write is supported. Set the value to RW.

RW

Response parameters

ParameterTypeDescriptionExample
object
Datastring

The struct returned. { "RequestId": the request ID, "Data": "{ "clusterType": the cluster type, "remoteWriteUrl": the public URL for remote write, "internetGrafanaUrl": the internal URL for Grafana, "authToken": indicates whether authentication is enabled, "internetPushGatewayUrl": the internal URL for Pushgateway, "clusterId": the cluster ID, "internetRemoteReadUrl": the internal URL for remote read, "remoteReadUrl": the public URL for remote read, "grafanaUrl": the public URL for Grafana, "pushGatewayUrl": the public URL for Pushgateway, "internetRemoteWriteUrl": the internal URL for remote write}" }

{ "RequestId": "1293091C-54AD-50FE-B787-E314B94B35AB", "Data": "{ "clusterType":"remote-write-prometheus", "remoteWriteUrl":"http://cn-hu/api/v3/write", "internetGrafanaUrl":"https://cn-hanga/cn-hangzhou", "authToken":false, "internetPushGatewayUrl":"https://cangzhou/api/v2", "clusterId":"vrju1lj3sa|123456", "internetRemoteReadUrl":"https://cn-hangzh67cn-hangzhou/api/v1/read", "remoteReadUrl":"http://cn-hanou/api/v1/read", "grafanaUrl":"http://cn-angzhou", "pushGatewayUrl":"htt1lj3sa/cn-hangzhou/api/v2", "internetRemoteWriteUrl":"httpsngzhou/api/v3/write"}" }
RequestIdstring

The request ID.

9319A57D-2D9E-472A-B69B-CF3CD16D****
Codeinteger

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

200
Messagestring

The message returned.

success
Successboolean

Indicates whether the request was successful.

true

Examples

Sample success responses

JSONformat

{
  "Data": "{\n  \"RequestId\": \"1293091C-54AD-50FE-B787-E314B94B35AB\",\n  \"Data\": \"{\n  \"clusterType\":\"remote-write-prometheus\",\n  \"remoteWriteUrl\":\"http://cn-hu/api/v3/write\",\n  \"internetGrafanaUrl\":\"https://cn-hanga/cn-hangzhou\",\n  \"authToken\":false,\n  \"internetPushGatewayUrl\":\"https://cangzhou/api/v2\",\n  \"clusterId\":\"vrju1lj3sa|123456\",\n  \"internetRemoteReadUrl\":\"https://cn-hangzh67cn-hangzhou/api/v1/read\",\n  \"remoteReadUrl\":\"http://cn-hanou/api/v1/read\",\n  \"grafanaUrl\":\"http://cn-angzhou\",\n  \"pushGatewayUrl\":\"htt1lj3sa/cn-hangzhou/api/v2\",\n  \"internetRemoteWriteUrl\":\"httpsngzhou/api/v3/write\"}\"\n}",
  "RequestId": "9319A57D-2D9E-472A-B69B-CF3CD16D****",
  "Code": 200,
  "Message": "success",
  "Success": true
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-08-29The API operation is deprecatedView Change Details
2023-03-23The response structure of the API has changedView Change Details
2022-07-29Add OperationView Change Details