# getEnvironmentMetrics

> Function getEnvironmentMetrics in pulumi-portainer.

<!-- Generated from the pulumi-portainer SDK. -->

Function getEnvironmentMetrics in pulumi-portainer.

Invoke token: `portainer:index/getEnvironmentMetrics:getEnvironmentMetrics`.

## Example

Only required arguments are set. A string in angle brackets stands in for that argument. Any other value is an option or example written in the SDK description.

```ts
import * as portainer from "pulumi-portainer"

const result = await portainer.getEnvironmentMetrics({
  aggregation: "<aggregation>",
  endpointId: 0,
  from: "<from>",
  metric: "<metric>",
  to: "<to>",
})
```

`getEnvironmentMetricsOutput` accepts Input values and returns `Output` of the same result.

## Arguments

| Property      | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `aggregation` | `string` | yes      |             |
| `endpointId`  | `number` | yes      |             |
| `from`        | `string` | yes      |             |
| `groupBy`     | `string` | no       |             |
| `id`          | `string` | no       |             |
| `kind`        | `string` | no       |             |
| `metric`      | `string` | yes      |             |
| `name`        | `string` | no       |             |
| `namespace`   | `string` | no       |             |
| `to`          | `string` | yes      |             |

## Result

| Property      | Type     | Always present | Description |
| ------------- | -------- | -------------- | ----------- |
| `aggregation` | `string` | yes            |             |
| `data`        | `string` | yes            |             |
| `endpointId`  | `number` | yes            |             |
| `from`        | `string` | yes            |             |
| `groupBy`     | `string` | no             |             |
| `id`          | `string` | yes            |             |
| `kind`        | `string` | no             |             |
| `metric`      | `string` | yes            |             |
| `name`        | `string` | no             |             |
| `namespace`   | `string` | no             |             |
| `to`          | `string` | yes            |             |
