Back to Prefect

__init__

docs/v3/api-ref/python/prefect-cli-cloud-__init__.mdx

3.6.30.dev31.3 KB
Original Source

prefect.cli.cloud

Cloud command — authenticate and interact with Prefect Cloud.

Functions

login <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/cloud/__init__.py#L56" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
login()

Log in to Prefect Cloud. Creates a new profile configured to use the specified PREFECT_API_KEY. Uses a previously configured profile if it exists.

logout <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/cloud/__init__.py#L284" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
logout()

Logout the current workspace. Reset PREFECT_API_KEY and PREFECT_API_URL to default.

workspace_ls <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/cloud/__init__.py#L317" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
workspace_ls()

List available workspaces.

workspace_set <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/cloud/__init__.py#L374" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
workspace_set()

Set current workspace. Shows a workspace picker if no workspace is specified.