ListPrometheusViews

Updated at:

Retrieves a list of Prometheus view instances.

Operation description

Retrieves a list of Prometheus view instances.

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

cms:ListPrometheusViews

list

*PrometheusView

acs:cms:{#regionId}:{#accountId}:prometheusview/*

None None

Request syntax

GET /prometheus-views HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

prometheusViewIds

string

No

The list of Prometheus view instance IDs.

view-xxx

prometheusViewName

string

No

The name of the Prometheus view.

view1

workspace

string

No

The name of the workspace.

workspace-test

version

string

No

The instance version. Valid values: V1 and V2.

Valid values:

  • V1 :

    V1

  • V2 :

    V2

V2

resourceType

string

No

The resource type.

PROMETHEUSVIEW

filterRegionIds deprecated

string

No

The region IDs used for filtering. Currently, only a single region ID is supported.

cn-zhangjiakou,cn-beijing

resourceGroupId

string

No

The ID of the resource group.

rg-acfm3gn5i6bigbi

tag

array<object>

No

The list of tags.

object

No

The list of tags.

key

string

No

The tag key.

key1

value

string

No

The tag value.

value1

maxResults

integer

No

The maximum number of entries to return.

100

nextToken

string

No

The pagination token.

44ANBjKZmQeKnaB1fXRq06w7sFYK3MUcCALMD9qQbmEiE

Response elements

Element

Type

Description

Example

object

Schema of Response

maxResults

integer

The maximum number of entries to return.

10

nextToken

string

The pagination token for the next query.

2-ba4d-4b9f-aa24-dcb067a30f1c

prometheusViews

array<object>

The list of Prometheus view instances.

object

The Prometheus view instance.

createTime

string

The time when the instance was created. The time is displayed in UTC+0 in the yyyy-MM-ddTHH:mmZ format.

2025-07-12T02:18:36Z

instanceType

string

The instance type. Valid values:

  • prom-view: New version aggregate view.

  • global-view: Legacy version aggregate view.

prom-view

paymentType

string

The billing method. Currently, the value is fixed to FREE.

FREE

product

string

The product to which the Prometheus instance belongs, such as ARMS or CMS.

cms

prometheusInstanceCount

integer

The number of Prometheus instances included in the view.

2

prometheusViewId

string

The ID of the Prometheus view.

view-xxx

prometheusViewName

string

The name of the Prometheus view.

view1

regionId

string

The region ID.

cn-zhangjiakou

resourceType

string

The resource type. The value is fixed to PrometheusView.

PrometheusView

status

string

The status of the backend data storage.

Running

userId

string

The user ID.

123xxx

version

string

The version.

V2

workspace

string

The workspace to which the Prometheus instance belongs.

default-cms-1490404746278495-cn-hangzhou

resourceGroupId

string

The ID of the resource group.

rg-acfm3gn5i6bigbi

requestId

string

Id of the request

0CEC5375-C554-562B-A65F-9A629907C1F0

totalCount

integer

The total number of instances.

66

Examples

Success response

JSON format

{
  "maxResults": 10,
  "nextToken": "2-ba4d-4b9f-aa24-dcb067a30f1c",
  "prometheusViews": [
    {
      "createTime": "2025-07-12T02:18:36Z",
      "instanceType": "prom-view",
      "paymentType": "FREE",
      "product": "cms",
      "prometheusInstanceCount": 2,
      "prometheusViewId": "view-xxx",
      "prometheusViewName": "view1",
      "regionId": "cn-zhangjiakou",
      "resourceType": "PrometheusView",
      "status": "Running",
      "userId": "123xxx",
      "version": "V2",
      "workspace": "default-cms-1490404746278495-cn-hangzhou",
      "resourceGroupId": "rg-acfm3gn5i6bigbi"
    }
  ],
  "requestId": "0CEC5375-C554-562B-A65F-9A629907C1F0",
  "totalCount": 66
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.