All Products
Search
Document Center

Application Real-Time Monitoring Service:ListEnvironments

Last Updated:Nov 05, 2024

Queries environments.

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: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
Tagarray<object>No

The tags.

objectNo

Resource tag value.

KeystringNo

The tag key.

env
ValuestringNo

The tag value.

gfn_web_outbound_add
BindResourceIdstringNo

The ID of the resource.

cff30f0d67d7542dfb05bd114b4b1d7af
FeePackagestringNo

The payable resource plan.

  • If the EnvironmentType parameter is set to CS, set the value to CS_Basic or CS_Pro. Default value: CS_Basic.
  • Otherwise, leave the parameter empty.

Valid values:

  • CS_Pro: Container Monitoring Pro
  • CS_Basic: Container Monitoring Basic
CS_Pro
FilterRegionIdsstringNo

The region IDs.

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.

Environmentsarray<object>

The queried environments.

environmentsobject

Environment details.

Addonsarray<object>

The add-ons.

addonsobject

Addon details.

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
  • Cloud: cloud service
Enumeration Value:
  • CS: Container service.
  • ECS: ECS service.
  • Cloud: Cloud service.
CS
Featuresarray<object>

The parameters of the feature.

featuresobject

Feature details.

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
Tagsarray<object>

The tags of the environment resource.

tagsobject

Resource tag value.

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

Indicates whether agents or exporters are managed. Valid values:

  • none: No. By default, no managed agents or exporters are provided for ACK clusters.
  • agent: Agents are managed. By default, managed agents are provided for ASK clusters, ACS clusters, and ACK One clusters.
  • agent-exproter: Agents and exporters are managed. By default, managed agents and exporters are provided for cloud services.
agent
FeePackagestring

The payable resource plan.

  • If the EnvironmentType parameter is set to CS, set the value to CS_Basic or CS_Pro.
  • Otherwise, leave the parameter empty.
CS_Pro
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",
        "FeePackage": "CS_Pro"
      }
    ],
    "Total": 12
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-07-26The request parameters of the API has changedView Change Details
2024-05-07The request parameters of the API has changed. The response structure of the API has changedView Change Details
2024-01-29The request parameters of the API has changedView Change Details
2024-01-23The response structure of the API has changedView Change Details