From f1e4be6ae824b6eedf8a8552d8132f9898c15641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20V=2E=20Treider?= Date: Wed, 29 Nov 2023 11:43:32 +0100 Subject: [PATCH] handle single acl passed to Group init. upd docstring --- cognite/client/data_classes/iam.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cognite/client/data_classes/iam.py b/cognite/client/data_classes/iam.py index ee9ead3a6c..ca62a68767 100644 --- a/cognite/client/data_classes/iam.py +++ b/cognite/client/data_classes/iam.py @@ -20,11 +20,12 @@ class Group(CogniteResource): Args: name (str): Name of the group source_id (str | None): ID of the group in the source. If this is the same ID as a group in the IDP, a service account in that group will implicitly be a part of this group as well. - capabilities (list[Capability] | None): No description. - id (int | None): No description. + capabilities (list[Capability] | None): List of capabilities (acls) this group should grant its users. + id (int | None): A server-generated ID for the object. is_deleted (bool | None): No description. deleted_time (int | None): No description. - metadata (dict[str, Any] | None): Custom, immutable application specific metadata. String key -> String value. Limits: + metadata (dict[str, Any] | None): Custom, immutable application specific metadata. String key -> String value. + Limits: Key are at most 32 bytes. Values are at most 512 bytes. Up to 16 key-value pairs. Total size is at most 4096. cognite_client (CogniteClient | None): The client to associate with this object. """ @@ -42,6 +43,8 @@ def __init__( self.name = name self.source_id = source_id self.capabilities = capabilities + if isinstance(self.capabilities, Capability): + self.capabilities = [capabilities] self.id = id self.is_deleted = is_deleted self.deleted_time = deleted_time