:py:mod:`laceworksdk.api.v2.agent_access_tokens` ================================================ .. py:module:: laceworksdk.api.v2.agent_access_tokens .. autoapi-nested-parse:: Lacework AgentAccessTokens API wrapper. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: laceworksdk.api.v2.agent_access_tokens.AgentAccessTokensAPI .. py:class:: AgentAccessTokensAPI(session) Bases: :py:obj:`laceworksdk.api.crud_endpoint.CrudEndpoint` A class used to represent the `Agent Access Tokens API endpoint `_ To connect to the Lacework instance, Lacework agents require an agent access token. .. py:property:: session Get the :class:`HttpSession` instance the object is using. .. py:method:: create(alias, enabled, props=None, **request_params) A method to create a new agent access token. :param alias: A string representing the name you wish to give to the created token. :type alias: str :param enabled: A boolean/integer representing whether the token is enabled. :type enabled: bool|int :param props: A dict containing optional values for the following fields: - description(str, optional): a description of the token - os(str, optional): the operating system - subscription(str, optional): The subscription level of the token. Valid values are: "standard", "professional", "enterprise" :type props: dict, optional :param request_params: Use to pass any additional parameters the API :type request_params: dict :returns: The new access token :rtype: dict .. py:method:: get_by_id(id) A method to get an agent access token by its ID. :param id: A string representing the object ID. :type id: str :returns: a JSON object containing info regarding the requested access token :rtype: dict .. py:method:: update(id, token_enabled=None, props=None, **request_params) A method to update an agent access token. :param id: A string representing the object ID. :type id: str :param token_enabled: A boolean/integer representing whether the object is enabled. :type token_enabled: bool|int, optional :param props: A dict containing optional values for the following fields: - description (str, optional): a description of the token - os (str, optional): the operating system - subscription (str, optional): The subscription level of the token. Valid values are: "standard", "professional", "enterprise" :type props: dict, optional :param request_params: Use to pass any additional parameters the API :type request_params: dict :returns: The updated access token. :rtype: dict .. py:method:: delete() Lacework does not currently allow for agent access tokens to be deleted. .. py:method:: get(id=None, resource=None, **request_params) A method to get objects. :param id: A string representing the object ID. :type id: str :param resource: The Lacework API resource type to get. :type resource: str :param request_params: A dictionary of parameters to add to the request. :type request_params: any :returns: JSON containing the retrieved object(s) :rtype: dict .. 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