Skip to main content

astro deployment token workspace-token

astro only
This command is only available on Astro.

Manage Workspace-level API tokens within a specific Deployment. See Assign an Organization or Workspace API token to a Deployment.

astro deployment workspace-token add

Add a Workspace API token to a Deployment and grant it Deployment-specific permissions.

Usage

astro deployment workspace-token add --deployment-id=<my-deployment-id> --role=DEPLOYMENT_ADMIN --workspace-token-name=<workspace-token-name>

Options

OptionDescriptionValid Values
--deployment-idThe Deployment ID where you want to manage tokens.Any Deployment ID.
-r, --roleThe role the API token has in the Deployment.DEPLOYMENT_ADMIN or a custom role name.
-n, --workspace-token-nameThe Workspace API token name.Any string. If the name contains a space, specify the entire name within quotes "".
--workspace-idThe Workspace to which the Deployment belongs.Any Workspace ID.

Example

astro deployment workspace-token add --deployment-id=clvduhrvd000008l842ohcpvb  --role=DEPLOYMENT_ADMIN --workspace-token-name="My workspace token"

astro deployment workspace-token list

List all Workspace API tokens that are assigned to a specific Deployment.

Usage

astro deployment workspace-token list --deployment-id=<your-deployment-id> --workspace-id=<your-workspace-ic>

Options

OptionDescriptionValid Values
--deployment-idThe ID of the Deployment to list API tokens for.Any Deployment ID.
--workspace-idThe Workspace to which the Deployment belongs.Any Workspace ID.

Output

OutputDescriptionData Type
IDThe API token ID.String
NAMEThe name of the API token.String
DESCRIPTIONThe API token description.String
SCOPEThe original scope of the API token.String
DEPLOYMENT_ROLEThe API token's role in the Deployment.String
CREATEDHow long ago the API token was created, in days.String
CREATED BYThe name of the user who created the API token.String

Example

astro deployment workspace-token list --deployment-id=clvduhrvd000008l842ohcpvb

astro deployment workspace-token remove

Remove a Workspace API token from a Deployment.

Usage

astro deployment workspace-token remove --deployment-id=<my-deployment-id> --workspace-token-name=<workspace-token-name> --workspace-id=<my-workspace-id>

Options

OptionDescriptionValid Values
--deployment-idThe Deployment ID you want to remove an API token from.Any Deployment ID.
-n, --workspace-token-nameThe name of the Workspace API token you want to remove from the Deployment.Any string.
--workspace-idThe Workspace to which the Deployment belongs.Any Workspace ID.

Example

astro deployment workspace-token remove --deployment-id=clvduhrvd000008l842ohcpvb --workspace-token-name="My workspace token" --workspace-id=clvdwt4z3000008l60ofb6347

astro deployment workspace-token update

Update the role a Workspace API token has within a Deployment.

Usage

astro deployment workspace-token update --workspace-token-name=<workspace-token-name> --deployment-id=<my-deployment-id> --role=DEPLOYMENT_ADMIN

Options

OptionDescriptionValid Values
--deployment-idThe Deployment ID you want to scope a Workspace API token to.Any Deployment ID.
-r, --roleThe Deployment role that you want to assign to the token.DEPLOYMENT_ADMIN or a custom role name.
-n, --workspace-token-nameThe name of the Workspace API token you want to update.Any string.
--workspace-idThe Workspace to which the Deployment belongs.Any Workspace ID.

Example

astro deployment workspace-token update --deployment-id=clvduhrvd000008l842ohcpvb --role=DEPLOYMENT_ADMIN --workspace-token-name="My workspace token"

Was this page helpful?

Sign up for Developer Updates

Get a summary of new Astro features once a month.

You can unsubscribe at any time.
By proceeding you agree to our Privacy Policy, our Website Terms and to receive emails from Astronomer.