AddPrometheusInstance

Updated at:

Creates a Prometheus instance for Remote Write.

Note

This API has been deprecated. We recommend migrating to ARMS(2019-08-08) - CreatePrometheusInstance for enhanced functionality and continued support. While the deprecated API remains temporarily accessible, no further updates or bug fixes will be provided.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

arms:AddPrometheusInstance

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID.

cn-hangzhou

Name

string

Yes

The name of the Prometheus instance for Remote Write.

notificationpolicy_test

Type

string

Yes

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

RW

Response elements

Element

Type

Description

Example

object

Data

string

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"}" }

RequestId

string

The request ID.

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

Code

integer

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

200

Message

string

The message returned.

success

Success

boolean

Indicates whether the request was successful.

true

Examples

Success response

JSON format

{
  "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

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.