> ## 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 deployment token update

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

Update an Astro [Deployment API Token](/docs/astro/deployment-api-tokens).

To use your API token in an automated process, see [Authenticate an automation tool](/docs/astro/automation-authentication).

## Usage

```sh wrap theme={null}
astro deployment token update --deployment-id=MOCK_DEP_ID
```

## Options

| Option                | Description                                                                                                           | Possible Values            |
| --------------------- | --------------------------------------------------------------------------------------------------------------------- | -------------------------- |
| `-d`, `--description` | Updated description of the token. If the description contains a space, specify the entire description in quotes `""`. | String                     |
| `-t`,`--name`         | The current name of the token. If the name contains a space, specify the entire name within quotes `""`.              | String                     |
| `-n`, `--new-name`    | The token's new name. If the new name contains a space, specify the entire name within quotes "".                     | String                     |
| `-r`, `--role`        | The role for the token. Possible values are `DEPLOYMENT_ADMIN` or a custom role name.                                 | Any valid Deployment role. |

## Examples

```bash wrap theme={null}
# The CLI prompts you to input a role for a token with Token ID assigned to a specific Deployment
astro deployment token update <token-id> --deployment-id=clukapi6r000008l58530cg8i

# The CLI prompts you to input a role for a token identified by its name
astro deployment token update --deployment-id=clukapi6r000008l58530cg8i --name="Token name"

# The CLI prompts you to select the token from a list and input a role
astro deployment token update --deployment-id=clukapi6r000008l58530cg8i

# This command assigns a token with the specified TOKEN_ID the role `Deployment Admin` to a Deployment with the following ID.
astro deployment token update TOKEN_ID --deployment-id=clukapi6r000008l58530cg8i --role=DEPLOYMENT_ADMIN
```

## Related commands

* [`astro deployment token create`](/docs/cli/v1.41/astro-deployment-token-create)
* [`astro deployment token list`](/docs/cli/v1.41/astro-deployment-token-list)
* [`astro deployment token rotate`](/docs/cli/v1.41/astro-deployment-token-rotate)
