ServiceAccounts API Reference¶
ServiceAccounts¶
- class apolo_sdk.ServiceAccounts¶
Service accounts subsystems. Service accounts can be used to generate tokens that can be used in automated environments by third-party services.
- async list() AsyncContextManager[AsyncIterator[ServiceAccount]] [source]¶
List user’s service accounts, async iterator. Yields
ServiceAccount
instances.
- async create(name: Optional[str], default_cluster: Optional[str]) Tuple[ServiceAccount, str] [source]¶
Create a service account.
- Parameters:
- Returns:
Pair of newly created service account info and token. This is the only way to get token of a service account.
- async get(id_or_name: str) ServiceAccount [source]¶
Get a service account with id or name id_or_name.
- Parameters:
id_or_name (str) – service account’s id or name.
- Returns:
Service account info (
ServiceAccount
)
ServiceAccount¶
- class apolo_sdk.ServiceAccount¶
Read-only
dataclass
for describing service account instance.- role¶
Authorization role this service account is based on.
- name¶
The service account name set by user, unique among all user’s service accounts,
str
orNone
if no name was set.
- role_deleted¶
True
if corresponding role was deleted, otherwiseFalse
.