All Products
Search
Document Center

Managed Service for Prometheus:DescribeEnvironment

Last Updated:Nov 05, 2024

Queries the details of an environment.

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:DescribeEnvironmentget
  • 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
GrafanaWorkspaceIdstring

The ID of the Grafana workspace.

grafana-cn-27a3m8eem0a
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
FeePackagestring

The payable resource plan. Valid values:

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

The status of the database that is bound to the Prometheus instance.

Valid values:

  • UNINSTALLING

  • INSTALLING

  • UNINSTALLED

  • RUNNING

  • MODIFYING

RUNNING
SecurityGroupIdstring

The ID of the security group associated with the environment.

sg-8vbdgmf4nraiqa9bx0jo
VswitchIdstring

The ID of the vSwitch associated with the environment.

vsw-2ze7yr3f1x8snryaioo7u
ResourceGroupIdstring

The ID of the resource group.

rg-aek2vezare****
Tagsarray<object>

The tags.

tagsobject

The tag.

Keystring

The tag key.

user1
Valuestring

The tag value.

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",
    "GrafanaWorkspaceId": "grafana-cn-27a3m8eem0a",
    "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",
    "FeePackage": "CS_Basic",
    "DbInstanceStatus": "RUNNING",
    "SecurityGroupId": "sg-8vbdgmf4nraiqa9bx0jo",
    "VswitchId": "vsw-2ze7yr3f1x8snryaioo7u",
    "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-07-10The response structure of the API has changedView Change Details
2024-07-03The response structure of the API has changedView Change Details
2024-05-28The response structure of the API has changedView Change Details
2024-03-19The response structure of the API has changedView Change Details
2024-02-28The response structure of the API has changedView Change Details
2024-01-29The response structure of the API has changedView Change Details
2023-11-03The response structure of the API has changedView Change Details