All Products
Search
Document Center

Application Real-Time Monitoring Service:CreatePrometheusInstance

Last Updated:Jun 24, 2026

Creates a Managed Service for Prometheus instance.

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:CreatePrometheusInstance

create

*Prometheus

acs:arms:{#regionId}:{#accountId}:prometheus/*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The actual region ID.

cn-shanghai

ClusterType

string

Yes

The instance type. Valid values:

  • remote-write: Prometheus for Remote Write.

  • ecs (no longer supported): Prometheus for ECS.

  • global-view: Prometheus for GlobalView.

  • aliyun-cs (no longer supported): Prometheus for Container Service.

  • cloud-product (no longer supported): Prometheus for Cloud Service.

  • cloud-monitor (no longer supported): Prometheus for Hybrid Cloud Monitoring.

  • flink (no longer supported): Prometheus for Flink.

remote-write

VpcId

string

No

The VPC ID. This parameter is required when ClusterType is set to ecs or aliyun-cs for a managed ASK cluster.

vpc-rpn**********

VSwitchId

string

No

The vSwitch ID. This parameter is required when ClusterType is set to ecs or aliyun-cs for a managed ASK cluster.

vsw-bp1*********

SecurityGroupId

string

No

The Network Security group ID. This parameter is required when ClusterType is set to ecs or aliyun-cs for a managed ASK cluster.

sg-bp1********

ClusterId

string

No

The Container Service cluster ID. This parameter is required when ClusterType is set to aliyun-cs.

cc7a37ee31aea4ed1a059eff8034b****

ClusterName

string

No

The name of the cluster to create. This parameter is required when ClusterType is set to remote-write, ecs, or global-view.

For ecs instances, the ClusterName must follow the format "name-vpc-id", and the name part cannot exceed 24 characters. Example: "mytest1-vpc-xxxxxxxxxxx".

clusterNameOfTest

SubClustersJson

string

No

The JSON string of sub-instances for the GlobalView instance.

当clusterType为global-view时,需要传此参数:需要聚合的集群的信息列表;示例: [ { "headers":{ }, "regionId":"cn-hangzhou", "sourceType":"AlibabaPrometheus", "extras":{ }, "clusterId":"c39a1048921e04f***********", "sourceName":"arms-luyao-test", "dataSource":"", "userId":"1672753***********" }, { "headers":{ }, "regionId":"cn-beijing", "sourceType":"AlibabaPrometheus", "extras":{ }, "clusterId":"c6b6485496d5b40***********", "sourceName":"agent-321-测试", "dataSource":"", "userId":"1672753***********" }, { "headers":{ }, "regionId":"cn-zhangjiakou", "sourceType":"AlibabaPrometheus", "extras":{ }, "clusterId":"c261a4f3200c446***********", "sourceName":"zaifeng-cardinality-01", "dataSource":"", "userId":"1672753***********" } ]

AllSubClustersSuccess

boolean

No

Specifies whether all sub-instances must pass validation before the GlobalView instance is created. Default value: false, which indicates that partial success is allowed.

true

GrafanaInstanceId

string

No

The ID of the bound Grafana workspace. Set this parameter to "free" when you use the shared Grafana edition.

grafana-bp1*****

ResourceGroupId

string

No

The resource group ID.

rg-acfmxyexli2****

Tags

array<object>

No

The custom tags.

[ { "labelName":"labelValue" }, { "testName":"clusterA" } ]

object

No

The list of tags.

Key

string

No

The tag key.

TestKey

Value

string

No

The tag value.

TestValue

Duration

integer

No

The data storage duration, in days.

90

ArchiveDuration

integer

No

The number of days to automatically archive data after the storage period expires. Valid values: 60, 90, 180, and 365. A value of 0 indicates that data is not archived.

90

PaymentType

string

No

The Billable methods. Valid values: POSTPAY: pay-as-you-go based on the number of reported metrics. POSTPAY_GB: pay-as-you-go based on the volume of written metrics. Empty: uses the default billing method configured by the user. If no default is configured, the system defaults to billing based on the number of reported metrics.

POSTPAY

Response elements

Element

Type

Description

Example

object

Data

string

The instance ID returned after the instance is created.

  • For aliyun-cs instances, the Prometheus instance ID is the Container Service cluster ID.

  • For ecs instances, the Prometheus instance ID is the VPC ID.

qduukd****

RequestId

string

The request ID.

70675725-8F11-4817-8106-CFE0AD71****

Message

string

The returned message.

message

Code

integer

The HTTP status code. Valid values:

  • 2XX: success.

  • 3XX: redirection.

  • 4XX: request error.

  • 5XX: server error.

200

Examples

Success response

JSON format

{
  "Data": "qduukd****",
  "RequestId": "70675725-8F11-4817-8106-CFE0AD71****",
  "Message": "message",
  "Code": 200
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.