def METHOD_NAME(end_time: Optional[str] = None,
                              entity_id: Optional[str] = None,
                              kinds: Optional[Sequence[Union[str, 'EntityTimelineKind']]] = None,
                              number_of_bucket: Optional[int] = None,
                              resource_group_name: Optional[str] = None,
                              start_time: Optional[str] = None,
                              workspace_name: Optional[str] = None,
                              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetEntitiesGetTimelineResult:
    """
    Timeline for an entity.
    :param str end_time: The end timeline date, so the results returned are before this date.
    :param str entity_id: entity ID
    :param Sequence[Union[str, 'EntityTimelineKind']] kinds: Array of timeline Item kinds.
    :param int number_of_bucket: The number of bucket for timeline queries aggregation.
    :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__['endTime'] = end_time
    __args__['entityId'] = entity_id
    __args__['kinds'] = kinds
    __args__['numberOfBucket'] = number_of_bucket
    __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/v20210901preview:getEntitiesGetTimeline', __args__, opts=opts, typ=GetEntitiesGetTimelineResult).value
    return AwaitableGetEntitiesGetTimelineResult(
        meta_data=pulumi.get(__ret__, 'meta_data'),
        value=pulumi.get(__ret__, 'value'))