:py:mod:`laceworksdk.api.v2.resource_groups` ============================================ .. py:module:: laceworksdk.api.v2.resource_groups .. autoapi-nested-parse:: Lacework ResourceGroups API wrapper. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: laceworksdk.api.v2.resource_groups.ResourceGroupsAPI .. py:class:: ResourceGroupsAPI(session) Bases: :py:obj:`laceworksdk.api.crud_endpoint.CrudEndpoint` A class used to represent the `Resource Groups API endpoint `_ Resource groups provide a way to categorize Lacework-identifiable assets. .. py:property:: session Get the :class:`HttpSession` instance the object is using. .. py:method:: create(resource_name, resource_type, enabled, props, **request_params) A method to create a new ResourceGroups object. :param resource_name: The resource group name. :type resource_name: str :param resource_type: The resource group type. See the `API docs `_ for a list of types. :type resource_type: str :param enabled: Whether the object is enabled. :type enabled: bool|int :param props: The new resource group's properties. The format varies based on the value of the type arg. See the `API docs `_ for valid fields. :type props: dict :param request_params: Use to pass any additional parameters the API :type request_params: dict, optional :returns: The newly created resource group :rtype: dict .. py:method:: get(guid=None) A method to get resource groups. Using no args will get all resource groups. :param guid: The GUID of the resource group to get. :type guid: str, optional :returns: The requested resource group(s) :rtype: dict .. py:method:: get_by_guid(guid) A method to get resource groups by GUID. :param guid: The GUID of the resource group to get. :type guid: str :returns: The requested resource group(s) :rtype: dict .. py:method:: update(guid, resource_name=None, resource_type=None, enabled=None, props=None, **request_params) A method to update an ResourceGroups object. :param guid: A string representing the object GUID. :type guid: str :param resource_name: The resource group name. :type resource_name: str, optional :param resource_type: The resource group type. See the `API docs `_ for a list of types. :type resource_type: str, optional :param enabled: Whether the object is enabled. :type enabled: bool|int, optional :param props: The new resource group's properties. The format varies based on the value of the type arg. See the `API docs `_ for valid fields. :type props: dict, optional :param request_params: Use to pass any additional parameters the API :type request_params: dict, optional :returns: The newly created resource group :rtype: dict .. py:method:: delete(guid) A method to delete a resource groups. :param guid: The GUID of the resource group 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