Sharing access
- class datarobot.SharingAccess
Represents metadata about whom a entity (e.g. a data store) has been shared with
Added in version v2.14.
Currently
DataStores
,DataSources
,Datasets
,Projects
(new in version v2.15) andCalendarFiles
(new in version 2.15) can be shared.This class can represent either access that has already been granted, or be used to grant access to additional users.
- Variables:
username (
str
) – a particular userrole (
str
orNone
) – if a string, represents a particular level of access and should be one ofdatarobot.enums.SHARING_ROLE
. For more information on the specific access levels, see the sharing documentation. If None, can be passed to a share function to revoke access for a specific user.can_share (
bool
orNone
) – if a bool, indicates whether this user is permitted to further share. When False, the user has access to the entity, but can only revoke their own access but not modify any user’s access role. When True, the user can share with any other user at a access role up to their own. May be None if the SharingAccess was not retrieved from the DataRobot server but intended to be passed into a share function; this will be equivalent to passing True.can_use_data (
bool
orNone
) – if a bool, indicates whether this user should be able to view, download and process data (use to create projects, predictions, etc). For OWNER can_use_data is always True. If role is empty canUseData is ignored.user_id (
str
orNone
) – the id of the user
Sharing role
- class datarobot.models.sharing.SharingRole
Represents metadata about a user who has been granted access to an entity. At least one of id or username must be set.
- Variables:
id (
str
orNone
) – The ID of the user.role (
str
) – Represents a particular level of access. Should be one ofdatarobot.enums.SHARING_ROLE
.share_recipient_type (
SHARING_RECIPIENT_TYPE
) – The type of user for the object of the method. Can beuser
ororganization
.user_full_name (
str
orNone
) – The full name of the user.username (
str
orNone
) – The username (usually the email) of the user.can_share (
bool
orNone
) – Indicates whether this user is permitted to share with other users. When False, the user has access to the entity, but can only revoke their own access. They cannot not modify any user’s access role. When True, the user can share with any other user at an access role up to their own.