aip_sdk.list_secrets
aip_sdk.list_secrets(*, workspace_id: str | None = None, page: int = 1, per_page: int = 100, client: APIClient | None = None) -> list[WorkspaceSecret]
List a workspace's secrets by name, in alphabetical order.
Open to every member of the workspace: naming a secret is how a run asks for one, and no value is returned here.
Parameters
workspace_idstr | None: Workspace to read. Defaults to the session's workspace.pageint: 1-based page number.per_pageint: Page size, between 1 and 100.clientAPIClient | None: Optional pre-configured API client.
Returns
list[WorkspaceSecret]: list[WorkspaceSecret]: the secrets on the requested page, without their values.
Raises
InvalidArgumentError: Ifpageorper_pageis out of range.ForbiddenError: If you cannot access this workspace.NotFoundError: If no workspace has this id.NoWorkspaceSelectedError: If no workspace is passed and none is set for the session.AuthError: If credentials are missing or invalid.APIError: If the request otherwise fails.
Example:
for secret in aip.list_secrets(workspace_id="ws-abc123"):
print(secret.name, secret.description)