:py:mod:`laceworksdk.api.v2.team_members` ========================================= .. py:module:: laceworksdk.api.v2.team_members .. autoapi-nested-parse:: Lacework TeamMembers API wrapper. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: laceworksdk.api.v2.team_members.TeamMembersAPI .. py:class:: TeamMembersAPI(session) Bases: :py:obj:`laceworksdk.api.crud_endpoint.CrudEndpoint` A class used to represent the `Team Members API endpoint `_ DEPRECATED. Please use the TeamUsersAPI class instead. Team members can be granted access to multiple Lacework accounts and have different roles for each account. Team members can also be granted organization-level roles. Note: The TeamMembers API is deprecated and is unavailable if you have migrated to the new RBAC model in your Lacework Console. .. py:property:: session Get the :class:`HttpSession` instance the object is using. .. py:method:: create(user_name, user_enabled, props, org_admin=None, org_user=None, admin_role_accounts=None, user_role_accounts=None, **request_params) A method to create a new team member. :param user_name: The email address of the user. :type user_name: str :param user_enabled: Whether the object is enabled. :type user_enabled: bool|int :param props: The user configuration. Fields are: - firstName (str): The first name of the team member. - lastName (str): The last name of the team member. - company (str): The company of the team member. - accountAdmin (bool, optional): A boolean representing if the team member is an account admin. :type props: dict :param org_admin: Is the user an organization admin. (Organization-level Access Required) :type org_admin: bool, optional :param org_user: Is the user is an organization user. (Organization-level Access Required) :type org_user: bool, optional :param admin_role_accounts: A list accounts where the user is an admin. (Organization-level Access Required) :type admin_role_accounts: list of str :param user_role_accounts: A list of where the team member is a user. (Organization-level Access Required) :type user_role_accounts: list of str :param request_params: Use to pass any additional parameters the API :type request_params: dict, optional :returns: The newly created team member. :rtype: dict .. py:method:: get(guid=None) A method to get team members. Using no args will get all team members. :param guid: The GUID of the team member to get. :type guid: str, optional :returns: The requested team member :rtype: dict .. py:method:: get_by_guid(guid) A method to get a team member by GUID. :param guid: The GUID of the team member to get. :type guid: str :returns: The requested team member :rtype: dict .. py:method:: update(guid, user_name=None, user_enabled=None, props=None, org_admin=None, org_user=None, admin_role_accounts=None, user_role_accounts=None, **request_params) A method to update a TeamMembers object. :param guid: A string representing the object GUID. :param user_name: The email address of the user. :type user_name: str :param user_enabled: Whether the object is enabled. :type user_enabled: bool|int :param props: The user configuration. Fields are: - firstName (str): The first name of the team member. - lastName (str): The last name of the team member. - company (str): The company of the team member. - accountAdmin (bool, optional): A boolean representing if the team member is an account admin. :type props: dict :param org_admin: Is the user an organization admin. (Organization-level Access Required) :type org_admin: bool, optional :param org_user: Is the user is an organization user. (Organization-level Access Required) :type org_user: bool, optional :param admin_role_accounts: A list accounts where the user is an admin. (Organization-level Access Required) :type admin_role_accounts: list of str :param user_role_accounts: A list of where the team member is a user. (Organization-level Access Required) :type user_role_accounts: list of str :param request_params: Use to pass any additional parameters the API :type request_params: dict, optional :returns: The updated team member. :rtype: dict .. py:method:: delete(guid) A method to delete a team member. :param guid: The GUID of the team member to delete :type guid: str :returns: a Requests response object containing the response code :rtype: requests.models.Response .. py:method:: search(json=None) A method to search objects. See the API documentation for this API endpoint for valid fields to search against. NOTE: While the "value" and "values" fields are marked as "optional" you must use one of them, depending on the operation you are using. :param json: The desired search parameters: - timeFilter (dict, optional): A dict containing the time frame for the search: - startTime (str): The start time for the search - endTime (str): The end time for the search - filters (list of dict, optional): Filters based on field contents: - field (str): The name of the data field to which the condition applies - expression (str): The comparison operator for the filter condition. Valid values are: "eq", "ne", "in", "not_in", "like", "ilike", "not_like", "not_ilike", "not_rlike", "rlike", "gt", "ge", "lt", "le", "between" - value (str, optional): The value that the condition checks for in the specified field. Use this attribute when using an operator that requires a single value. - values (list of str, optional): The values that the condition checks for in the specified field. Use this attribute when using an operator that requires multiple values. - returns (list of str, optional): The fields to return :type json: dict :returns: returns a dict containing the search results :rtype: dict