# getMetric

> Function getMetric in pulumi-logtail.

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

Function getMetric in pulumi-logtail.

Invoke token: `logtail:index/getMetric:getMetric`.

## 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 logtail from "pulumi-logtail"

const result = await logtail.getMetric({
  name: "<name>",
  sourceId: "<sourceId>",
})
```

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

## Arguments

| Property   | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `name`     | `string` | yes      |             |
| `sourceId` | `string` | yes      |             |

## Result

| Property        | Type       | Always present | Description |
| --------------- | ---------- | -------------- | ----------- |
| `aggregations`  | `string[]` | yes            |             |
| `id`            | `string`   | yes            |             |
| `name`          | `string`   | yes            |             |
| `sourceId`      | `string`   | yes            |             |
| `sqlExpression` | `string`   | yes            |             |
| `type`          | `string`   | yes            |             |
