KeyPair 함수

class ai.backend.client.keypair.KeyPair(access_key)[소스]

Keypair들을 다룹니다.

session = None

이 함수 클래스가 사용할 클라이언트 세션 인스턴스

classmethod await create(user_id, is_active=True, is_admin=False, resource_policy=None, rate_limit=None, fields=None)[소스]

Creates a new keypair with the given options. You need an admin privilege for this operation.

반환 형식

dict

classmethod await update(access_key, is_active=None, is_admin=None, resource_policy=None, rate_limit=None)[소스]

Creates a new keypair with the given options. You need an admin privilege for this operation.

반환 형식

dict

classmethod await delete(access_key)[소스]

Deletes an existing keypair with given ACCESSKEY.

classmethod await list(user_id=None, is_active=None, fields=None)[소스]

Lists the keypairs. You need an admin privilege for this operation.

반환 형식

Sequence[dict]

await info(fields=None)[소스]

Returns the keypair's information such as resource limits.

매개변수

fields (Optional[Iterable[str]]) -- Additional per-agent query fields to fetch.

버전 18.12에 추가.

반환 형식

dict

classmethod await activate(access_key)[소스]

Activates this keypair. You need an admin privilege for this operation.

반환 형식

dict

classmethod await deactivate(access_key)[소스]

Deactivates this keypair. Deactivated keypairs cannot make any API requests unless activated again by an administrator. You need an admin privilege for this operation.

반환 형식

dict