def METHOD_NAME(add_default_extended_time_range: Optional[bool] = None,
                        end_time: Optional[str] = None,
                        entity_id: Optional[str] = None,
                        insight_query_ids: Optional[Sequence[str]] = None,
                        resource_group_name: Optional[str] = None,
                        start_time: Optional[str] = None,
                        workspace_name: Optional[str] = None,
                        opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetEntityInsightsResult:
    """
    Execute Insights for an entity.
    :param bool add_default_extended_time_range: Indicates if query time range should be extended with default time range of the query. Default value is false
    :param str end_time: The end timeline date, so the results returned are before this date.
    :param str entity_id: entity ID
    :param Sequence[str] insight_query_ids: List of Insights Query Id. If empty, default value is all insights of this entity
    :param str resource_group_name: The name of the resource group. The name is case insensitive.
    :param str start_time: The start timeline date, so the results returned are after this date.
    :param str workspace_name: The name of the workspace.
    """
    __args__ = dict()
    __args__['addDefaultExtendedTimeRange'] = add_default_extended_time_range
    __args__['endTime'] = end_time
    __args__['entityId'] = entity_id
    __args__['insightQueryIds'] = insight_query_ids
    __args__['resourceGroupName'] = resource_group_name
    __args__['startTime'] = start_time
    __args__['workspaceName'] = workspace_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('azure-native:securityinsights/v20230801preview:getEntityInsights', __args__, opts=opts, typ=GetEntityInsightsResult).value
    return AwaitableGetEntityInsightsResult(
        meta_data=pulumi.get(__ret__, 'meta_data'),
        value=pulumi.get(__ret__, 'value'))