All Products
Search
Document Center

Managed Service for Prometheus:DescribeEnvironment

Last Updated:May 09, 2024

Queries the details of an environment.

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

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

cn-hangzhou
EnvironmentIdstringYes

The ID of the environment instance.

env-xxxxx

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

C21AB7CF-B7AF-410F-BD61-82D1567F****
Codeinteger

The HTTP status code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed.

200
Dataobject

The returned struct.

EnvironmentIdstring

The ID of the environment instance.

env-xxxxx
EnvironmentTypestring

The type of the environment. Valid values:

  • CS: Container Service for Kubernetes (ACK)
  • ECS: Elastic Compute Service
  • Cloud: cloud service
CS
EnvironmentNamestring

The environment name.

env1
EnvironmentSubTypestring

Environment subtypes:

  • CS: Currently supports ACK.
  • ECS: ECS is currently supported.
  • Cloud: Currently supports Cloud.
ACK
RegionIdstring

The region ID.

cn-hangzhou
UserIdstring

The user ID.

13002222xxxx
BindResourceIdstring

The ID of the resource associated with the environment, such as the ACK cluster ID or VPC ID.

vpc-xxxxx
BindResourceTypestring

The resource type.

ECS
BindResourceStatusstring

The status of the resource.

running
BindResourceProfilestring

The profile of the resource.

Default
BindVpcCidrstring

The VPC CIDR block.

192.168.0.0/16
PrometheusInstanceIdstring

The ID of the Prometheus instance.

xxxxyyyyyzzzzz
PrometheusInstanceNamestring

The name of the Prometheus instance.

name1
GrafanaFolderUidstring

The unique ID of the Grafana directory.

xyz
GrafanaDatasourceUidstring

The unique ID of the Grafana data source.

zuvw
VpcIdstring

The VPC ID.

vpc-8vb02uk57qbcktqcvqqqj
GrafanaFolderUrlstring

The URL of the Grafana directory.

https://g.console.aliyun.com/dashboards/f/xxx/yyyy
BindResourceStoreDurationstring

The retention period of the resource. Unit: days.

15
GrafaDataSourceNamestring

The name of the Grafana data source.

datasource1
GrafanaFolderTitlestring

The name of the Grafana directory.

folder1
ManagedTypestring

managed type:

  • none: unmanaged. The default value for ACK clusters.
  • agent: managed agent (including KSM). The default values for ASK, ACS, and AckOne clusters.
  • agent-exporter: managed agent and exporters. The default value for the cloud service type.
none
ResourceGroupIdstring

The ID of the resource group.

rg-aek2vezare****
Tagsobject []

The tags.

Keystring

The key of the tag.

user1
Valuestring

The value of the tag.

p_dev
Messagestring

The returned message.

message

Examples

Sample success responses

JSONformat

{
  "RequestId": "C21AB7CF-B7AF-410F-BD61-82D1567F****",
  "Code": 200,
  "Data": {
    "EnvironmentId": "env-xxxxx",
    "EnvironmentType": "CS",
    "EnvironmentName": "env1",
    "EnvironmentSubType": "ACK",
    "RegionId": "cn-hangzhou",
    "UserId": "13002222xxxx",
    "BindResourceId": "vpc-xxxxx",
    "BindResourceType": "ECS",
    "BindResourceStatus": "running",
    "BindResourceProfile": "Default",
    "BindVpcCidr": "192.168.0.0/16",
    "PrometheusInstanceId": "xxxxyyyyyzzzzz",
    "PrometheusInstanceName": "name1",
    "GrafanaFolderUid": "xyz",
    "GrafanaDatasourceUid": "zuvw",
    "VpcId": "vpc-8vb02uk57qbcktqcvqqqj",
    "GrafanaFolderUrl": "https://g.console.aliyun.com/dashboards/f/xxx/yyyy",
    "BindResourceStoreDuration": "15",
    "GrafaDataSourceName": "datasource1",
    "GrafanaFolderTitle": "folder1",
    "ManagedType": "none",
    "ResourceGroupId": "rg-aek2vezare****",
    "Tags": [
      {
        "Key": "user1",
        "Value": "p_dev"
      }
    ]
  },
  "Message": "message"
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-03-19The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2024-02-28The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2024-01-29The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2023-11-03The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.