def METHOD_NAME(resource_group_name: Optional[str] = None,
                   server_name: Optional[str] = None,
                   sync_agent_name: Optional[str] = None,
                   opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetSyncAgentResult:
    """
    Gets a sync agent.
    Azure REST API version: 2021-11-01.
    :param str resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    :param str server_name: The name of the server on which the sync agent is hosted.
    :param str sync_agent_name: The name of the sync agent.
    """
    __args__ = dict()
    __args__['resourceGroupName'] = resource_group_name
    __args__['serverName'] = server_name
    __args__['syncAgentName'] = sync_agent_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('azure-native:sql:getSyncAgent', __args__, opts=opts, typ=GetSyncAgentResult).value
    return AwaitableGetSyncAgentResult(
        expiry_time=pulumi.get(__ret__, 'expiry_time'),
        id=pulumi.get(__ret__, 'id'),
        is_up_to_date=pulumi.get(__ret__, 'is_up_to_date'),
        last_alive_time=pulumi.get(__ret__, 'last_alive_time'),
        name=pulumi.get(__ret__, 'name'),
        state=pulumi.get(__ret__, 'state'),
        sync_database_id=pulumi.get(__ret__, 'sync_database_id'),
        type=pulumi.get(__ret__, 'type'),
        version=pulumi.get(__ret__, 'version'))