All Products
Search
Document Center

Managed Service for Prometheus:ListEnvironments

Last Updated:May 09, 2024

Queries environments.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:ListEnvironmentsList
  • Environment
    acs:arms:{#regionId}:{#accountId}:environment/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
EnvironmentTypestringNo

The environment type. You must specify at least one of the AddonName and EnvironmentType parameters.

Valid values:

  • CS

    :

    Container Service for Kubernetes (ACK)

  • ECS

    :

    Elastic Compute Service (ECS)

  • Cloud

    :

    cloud service

Enumeration Value:
  • CS: Container service.
  • ECS: ECS service.
  • Cloud: Cloud service.
CS
RegionIdstringNo

The region ID.

cn-hangzhou
AddonNamestringNo

The add-on name. You must specify at least one of the AddonName and EnvironmentType parameters.

trace-java
ResourceGroupIdstringNo

The ID of the resource group.

rg-aekzfurdatohtka
Tagobject []No

The tags.

KeystringNo

The tag key.

env
ValuestringNo

The tag value.

gfn_web_outbound_add
BindResourceIdstringNo

The ID of the resource.

cff30f0d67d7542dfb05bd114b4b1d7af

Response parameters

ParameterTypeDescriptionExample
object

response

RequestIdstring

The request ID.

1A9C645C-C83F-4C9D-8CCB-29BEC9E1****
Successboolean

Indicates whether the request was successful. Valid values: true and false.

true
Codeinteger

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

200
Messagestring

The returned message.

success
Dataobject

The returned struct.

Environmentsobject []

The parameters of the environment instance.

Addonsobject []

The add-ons.

Aliasstring

The alias of the add-on.

MySQL Exporter
Descriptionstring

The description of the add-on.

Collect mysql indicator information
Iconstring

The URL of the icon.

http://xxxx
Namestring

The name of the add-on.

metric-agent
UserIdstring

The user ID.

13990957477389
BindResourceIdstring

The ID of the resource bound to the environment instance. The resource can be a Kubernetes cluster or a VPC.

vpc-bp1bgo8ronn
BindResourceProfilestring

The profile that is bound to the resource.

xxx
BindResourceTypestring

The resource type.

VPC
BindVpcCidrstring

The CIDR block that is bound to the VPC.

172.16.0.0/12
CreateTimestring

The time when the environment instance was created.

2023-03-24 11:58:35 +0800
CreatedUserIdstring

The user ID.

12378523784982
EnvironmentIdstring

The ID of the environment instance.

env-xxx
EnvironmentNamestring

The name of the environment instance.

feiliks-biz-prod-edas
EnvironmentTypestring

The type of the environment instance. Valid values:

  • CS: Container Service
  • ECS: Elastic Compute Service (ECS)
  • Cloud: cloud service
Enumeration Value:
  • CS: Container service.
  • ECS: ECS service.
  • Cloud: Cloud service.
CS
Featuresobject []

The parameters of the feature.

Aliasstring

The alias of the feature.

Prometheus Agent
Descriptionstring

The description of the feature.

Collect Metric data using the Prometheus collection specification
Iconstring

The URL of the icon.

http://xxx
Namestring

The name of the feature.

metirc-agent
GrafanaFolderTitlestring

The name of the Grafana directory.

filepath
GrafanaFolderUidstring

The unique ID of the Grafana directory.

1798319482935
PrometheusIdlong

The Prometheus ID.

124769812
PrometheusInstanceIdstring

The ID of the Prometheus instance.

vpc-m5e4alj2i24ndbn
RegionIdstring

The region ID.

cn-zhangjiakou
ResourceGroupIdstring

The ID of the resource group.

rg-acfmvt3xpr5aema
Tagsobject []

The tags of the environment resource.

Keystring

The tag key.

fpx-tag
Valuestring

The tag value.

cn-beijing
GrafanaDatasourceUidstring

The unique ID of the Grafana data source.

12374890
ReleaseCountinteger

The number of installed add-ons.

122
LatestReleaseCreateTimestring

The time when the last add-on was created.

2023-09-22T16:56:29+08:00
ManagedTypestring

type of managed:

  • none: not managed. default value of prometheus for ACK.

  • agent: managed agent. default value of promehtues for ASK/ACS/AckOne.

  • agent-exproter: managed agent and exporter. default of prometheus for Cloud.

agent
Totallong

The total number of returned entries.

12

Examples

Sample success responses

JSONformat

{
  "RequestId": "1A9C645C-C83F-4C9D-8CCB-29BEC9E1****",
  "Success": true,
  "Code": 200,
  "Message": "success",
  "Data": {
    "Environments": [
      {
        "Addons": [
          {
            "Alias": "MySQL Exporter",
            "Description": "Collect mysql indicator information",
            "Icon": "http://xxxx",
            "Name": "metric-agent"
          }
        ],
        "UserId": "13990957477389",
        "BindResourceId": "vpc-bp1bgo8ronn",
        "BindResourceProfile": "xxx",
        "BindResourceType": "VPC",
        "BindVpcCidr": "172.16.0.0/12",
        "CreateTime": "2023-03-24 11:58:35 +0800",
        "CreatedUserId": "12378523784982",
        "EnvironmentId": "env-xxx",
        "EnvironmentName": "feiliks-biz-prod-edas",
        "EnvironmentType": "CS",
        "Features": [
          {
            "Alias": "Prometheus Agent",
            "Description": "Collect Metric data using the Prometheus collection specification",
            "Icon": "http://xxx",
            "Name": "metirc-agent"
          }
        ],
        "GrafanaFolderTitle": "filepath",
        "GrafanaFolderUid": "1798319482935",
        "PrometheusId": 124769812,
        "PrometheusInstanceId": "vpc-m5e4alj2i24ndbn",
        "RegionId": "cn-zhangjiakou",
        "ResourceGroupId": "rg-acfmvt3xpr5aema",
        "Tags": [
          {
            "Key": "fpx-tag",
            "Value": "cn-beijing"
          }
        ],
        "GrafanaDatasourceUid": "12374890",
        "ReleaseCount": 122,
        "LatestReleaseCreateTime": "2023-09-22T16:56:29+08:00",
        "ManagedType": "agent"
      }
    ],
    "Total": 12
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-05-07The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: FeePackage
Output ParametersThe response structure of the API has changed.
2024-01-29The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: BindResourceId
2024-01-23The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.