Why is `astro deployment inspect` not available?

I’m attempting to use the airflow REST API of a deployment following the official documentation (Make requests to the Airflow REST API | Astronomer Documentation). The second step is to use astro deployment inspect -n dev -k metadata.webserver_url. However, when I run that command, it prints the help for astro deployment and doesn’t list inspect as a sub-command.

$ astro deployment inspect -n dev -k metadata.webserver_url
Error: unknown shorthand flag: 'n' in -n
Usage:
  astro deployment [command]

Aliases:
  deployment, de, deployments

Available Commands:
  airflow         Manage airflow deployments
  create          Create a new Astronomer Deployment
  delete          Delete an Airflow Deployment
  list            List Airflow Deployment
  logs            Stream logs from an Airflow Deployment
  runtime         Manage runtime deployments
  service-account Manage astronomer service accounts
  team            Manage deployment team resources
  update          Update Airflow Deployments
  user            Manage Deployment user resources

Flags:
  -h, --help                  help for deployment
      --workspace-id string   ID of the workspace in which you want to manage deployments, you can leave it empty if you want to use your current context's workspace ID

Global Flags:
      --verbosity string   Log level (debug, info, warn, error, fatal, panic (default "warning")

Use "astro deployment [command] --help" for more information about a command

The inspect sub-command is documented (astro deployment inspect | Astronomer Documentation), and doesn’t list any reason why it would be filtered out. I also couldn’t find any reason in the for it to be filtered out.

I’ve logged in successfully and can run other commands like astro deployment list. Why isn’t it this sub-command available?

(links deliberately broken because the “new users can’t post more than one link”)

From the source code

It looks like I have to configure my astro tool for a cloud context?

Hi @cheez, Welcome to the Astronomer Community, Hope are you doing well!

Could you please share the Astro CLI version by running the command astro version?
Further, I suggest updating to the latest version of Astro CLI.

Here are the Astro CLI Release notes- Astro CLI release notes | Astronomer Documentation
and Here’s the process to upgrade the CLI - Install the Astro CLI | Astronomer Documentation

Hope this helps!

Regards,
Akash Laddha

Hi @cheez, You can use the Astro CLI context commands to list and switch context - astro context command reference | Astronomer Documentation

Or do astro logout, followed by astro login cloud.astronomer.io

Hope this helps and works for you

astro version prints 1.20.1.

So as I understand. This command is restricted because I’m using my companies domain of astro.my-comany.com instead of cloud.astronomer.io?

astro login cloud.astronomer.io

Welcome to the Astro CLI 🚀

To learn more about Astro, go to https://docs.astronomer.io


Press Enter to open the browser to log in or ^C to quit…

Logging in as my.name@my-company.com
Error: no organization found. Please contact your Astro Organization Owner to be invited to the organization

Is this restricted to certain users of my company or is no one in my company able to use this feature because of the domain it uses?

Hey @cheez, Yes this command to inspect the deployment is restricted to an Astro Deployment on the Astronomer Platform, so you should be a user of Astro Product to log in and authenticate to astro cloud to use this further to inspect the Astro deployments

Hope this helps and answers your query!

It’s ok. It wasn’t a required step for the main task. I could grab the URL i needed from the inspector and continue.

Sounds good. Thanks for reaching out!