> ## Documentation Index
> Fetch the complete documentation index at: https://astronomer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# astro env metrics-export update

> Update an Environment Manager metrics export.

<Info>
  This command is only available on Astro.
</Info>

Update an existing metrics export, identified by its ID or key. Provide only the fields you want to change.

## Usage

```bash wrap theme={null}
astro env metrics-export update <id-or-key>
```

## Options

| Option | Description | Possible Values |
| - | - | - |
| `<id-or-key>` | The ID or key of the metrics export to update. | Any valid metrics export ID or key |
| `--endpoint` | The remote endpoint to push metrics to. | Any valid URL |
| `--exporter-type` | The exporter type, for example `PROMETHEUS`. | Any valid exporter type |
| `--auth-type` | The authentication type for the endpoint. | `BASIC`, `AUTH_TOKEN`, or `SIGV4` |
| `--username` | The username for `BASIC` authentication. | Any string |
| `--password` | The password for `BASIC` authentication. If omitted alongside `--auth-type BASIC`, the CLI reads it from stdin when piped, or prompts for it with the input hidden. | Any string |
| `--basic-token` | The bearer or authentication token for `AUTH_TOKEN` authentication. | Any string |
| `--sigv4-assume-arn` | The AWS IAM role to assume for `SIGV4` authentication. | Any valid IAM role ARN |
| `--sigv4-sts-region` | The AWS STS region for `SIGV4` authentication. | Any valid AWS region |
| `--header` | A request header in `KEY=VALUE` form. Repeatable. | `KEY=VALUE` |
| `--label` | A metric label in `KEY=VALUE` form. Repeatable. | `KEY=VALUE` |
| `--auto-link` | Workspace scope only. Automatically link the metrics export to all Deployments in the Workspace, including future ones. | None |
| `--workspace-id` | Set the Workspace scope. Mutually exclusive with `--deployment-id`. Defaults to your current Workspace from CLI context. | Any valid Workspace ID |
| `--deployment-id` | Set the Deployment scope. Mutually exclusive with `--workspace-id`. | Any valid Deployment ID |

## Examples

```bash wrap theme={null}
# Update the labels on a Workspace metrics export
astro env metrics-export update prom_main --workspace-id <workspace-id> --label env=prod --label team=data
```

## Related commands

* [`astro env metrics-export create`](/docs/cli/v1.46/astro-env-metrics-export-create)
* [`astro env metrics-export get`](/docs/cli/v1.46/astro-env-metrics-export-get)
* [`astro env metrics-export list`](/docs/cli/v1.46/astro-env-metrics-export-list)
