Get Setup Status
get_setup_statusCheck whether a Redshift connection profile is configured, enabling proactive setup before database tools fail, or verifying setup success.
Instructions
Read-only check of whether a profile is configured. Safe to call at any time including the very start of a session — does not touch Redshift, does not return any secrets.
Use at session start to decide proactively whether to call
setup_via_dialog (before triggering any DB tool's
not_configured error path), or to verify a setup_via_dialog
call succeeded from a fresh angle.
profile overrides which profile to check in profile mode,
exactly like the CLI --profile flag — both go through
config.resolve_active_profile with the same priority. Omit
it (the default) to see the profile the server would actually
resolve to right now: REDSHIFT_COMMENT_PROFILE env var, then
the active-profile pointer file, then the upgrade-rescue
lone-profile fallback, before the literal "default". It has
no effect in inline / borrowed mode, where connection resolution
never consults a profile name at all.
Returns:
profile— in profile mode, the profile actually resolved (which may differ from what you passed, or from the literal "default", per the resolution above);Nonein inline / borrowed mode. No profile is that mode's connection target, so the field never names one — echoing back the call argument (or the literal "default") would tell you the connection is on a profile that may not even exist. In "borrowed" mode specifically, the lending profile's name is reported separately inborrowed_from_profile; the connection itself still never targets that profile, only borrows its passwordsource— the mechanism actually in force:"inline"(launch-arg host/user/dbname, password from theREDSHIFT_PASSWORDenv var or none),"borrowed"(launch-arg host/port/user/dbname, no inline password, but a stored profile whose host, port, user AND dbname all match lent its keychain password — the connection target is still the INLINE values, never the matched profile's), or"profile"(config.toml + keychain, no launch args)configured— bool, equivalent to has_fields && has_passwordhas_fields— whether the connection target (host / port / user / dbname) is known; in inline / borrowed mode, always True (the fields came from launch args); in profile mode, False only when the resolved profile has no config.toml entryhas_password— whether a password is available (OS keychain in profile / borrowed mode; theREDSHIFT_PASSWORDenv var in plain inline mode). NEVER returns the password itselfhost/port/user/dbname— the target the connection will actually use, present only when has_fields=True (these are non-secret)borrowed_from_profile— present only when source="borrowed": the name of the profile whose keychain password was borrowednext_step— present only when configured=False; actionable hint pointing at the right mechanism for the mode
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||