SharingAccess

class datarobot.SharingAccess(username, role, can_share=None, can_use_data=None, user_id=None)

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) and CalendarFiles (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.

Attributes:
usernamestr

a particular user

rolestr or None

if a string, represents a particular level of access and should be one of datarobot.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_sharebool or None

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_databool or None

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_idstr or None

the id of the user

SharingRole

class datarobot.models.sharing.SharingRole(role, share_recipient_type, can_share=None, id=None, user_full_name=None, username=None)

Represents metadata about a user who has been granted access to an entity. At least one of id or username must be set.

Attributes:
idstr or None

The ID of the user.

rolestr

Represents a particular level of access. Should be one of datarobot.enums.SHARING_ROLE.

share_recipient_typeSHARING_RECIPIENT_TYPE

The type of user for the object of the method. Can be user or organization.

user_full_namestr or None

The full name of the user.

usernamestr or None

The username (usually the email) of the user.

can_sharebool or None

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.